Cannot execute binary file apt-get

New to Debian (Or Linux in general)? Ask your questions here!

Cannot execute binary file apt-get

Postby kingrazor » 2018-05-26 15:33

New to Debian. Just did a fresh install and am attempting to run apt-get. When I run without su, I get denied permission. When I run this command:

su brian apt-get update

brian is my username. I get prompted for my password, then get the following error message:

/usr/bin/apt-get: /usr/bin/apt-get: cannot execute binary file

Doing the same thing works in a mint install I have running. Any ideas?
kingrazor
 
Posts: 4
Joined: 2018-05-26 15:29

Re: Cannot execute binary file apt-get

Postby arochester » 2018-05-26 15:41

1) Become Root by inputting
Code: Select all
su

It will ask for the password
2)Then issue the command
Code: Select all
apt update
arochester
 
Posts: 1349
Joined: 2010-12-07 19:55

Re: Cannot execute binary file apt-get

Postby kingrazor » 2018-05-26 16:08

arochester wrote:1) Become Root by inputting
Code: Select all
su

It will ask for the password
2)Then issue the command
Code: Select all
apt update


This got me a bit farther but then I get this message:

"Updating from such a repository can't be done securely, and is therefore disabled by default." I get this message even if I use
Code: Select all
--allow-unauthenticated
kingrazor
 
Posts: 4
Joined: 2018-05-26 15:29

Re: Cannot execute binary file apt-get

Postby arochester » 2018-05-26 16:22

What does your sources list say, and sources.list.d ?
arochester
 
Posts: 1349
Joined: 2010-12-07 19:55

Re: Cannot execute binary file apt-get

Postby kingrazor » 2018-05-26 16:41

Sources.list:

#

# deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 DVD Binary-1 20180310-11:21]/ stretch contrib main

deb cdrom:[Debian GNU/Linux 9.4.0 _Stretch_ - Official amd64 DVD Binary-1 20180310-11:21]/ stretch contrib main

# Line commented out by installer because it failed to verify:
# deb http://security.debian.org/debian-security stretch/updates main contrib
# Line commented out by installer because it failed to verify:
# deb-src http://security.debian.org/debian-security stretch/updates main contrib

# stretch-updates, previously known as 'volatile'
# A network mirror was not selected during install. The following entries
# are provided as examples, but you should amend them as appropriate
# for your mirror of choice.
#
# deb http://deb.debian.org/debian/ stretch-updates main contrib
deb http://deb.debian.org/debian/ stretch main
# deb-src http://deb.debian.org/debian/ stretch-updates main contrib


sources.list.d folder is empty
kingrazor
 
Posts: 4
Joined: 2018-05-26 15:29

Re: Cannot execute binary file apt-get

Postby debiman » 2018-05-26 17:14

at this point it might be a good idea to mosey over to wiki.debian.org and see what they have to say about a good sources.list for stable.
only 1 entry seems too little to me, but i might be wrong.
and you should probably comment out the CD.
did you install without an internet connection? that would require manual configuration later on.
User avatar
debiman
 
Posts: 3064
Joined: 2013-03-12 07:18

Re: Cannot execute binary file apt-get

Postby arochester » 2018-05-26 18:00

Change your sources list to
Code: Select all
deb http://deb.debian.org/debian stretch main contrib non-free

deb http://deb.debian.org/debian stretch-updates main contrib non-free

deb http://security.debian.org/debian-security/ stretch/updates main contrib non-free


Copy and paste if necessary.

Try updating again.
arochester
 
Posts: 1349
Joined: 2010-12-07 19:55

Re: Cannot execute binary file apt-get

Postby kingrazor » 2018-05-26 19:06

That worked. Not sure why they didn't just include those sources as part of the default install.
kingrazor
 
Posts: 4
Joined: 2018-05-26 15:29

Re: Cannot execute binary file apt-get

Postby stevepusser » 2018-05-26 20:10

The installer disables them if it can't connect during the install.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: Flightgear 2018.2.2, 4.19.5 kernel, wine-staging 4.0~rc1, Pale Moon 28.2.2, Mesa 18.2.6, Midori 7.0
User avatar
stevepusser
 
Posts: 10292
Joined: 2009-10-06 05:53


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 5 guests

fashionable