Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Cannot execute binary file apt-get

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
kingrazor
Posts: 4
Joined: 2018-05-26 15:29

Cannot execute binary file apt-get

#1 Post by kingrazor »

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?

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 54 times

Re: Cannot execute binary file apt-get

#2 Post by arochester »

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

kingrazor
Posts: 4
Joined: 2018-05-26 15:29

Re: Cannot execute binary file apt-get

#3 Post by kingrazor »

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

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 54 times

Re: Cannot execute binary file apt-get

#4 Post by arochester »

What does your sources list say, and sources.list.d ?

kingrazor
Posts: 4
Joined: 2018-05-26 15:29

Re: Cannot execute binary file apt-get

#5 Post by kingrazor »

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

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Cannot execute binary file apt-get

#6 Post by debiman »

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.

arochester
Emeritus
Emeritus
Posts: 2435
Joined: 2010-12-07 19:55
Has thanked: 14 times
Been thanked: 54 times

Re: Cannot execute binary file apt-get

#7 Post by arochester »

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.

kingrazor
Posts: 4
Joined: 2018-05-26 15:29

Re: Cannot execute binary file apt-get

#8 Post by kingrazor »

That worked. Not sure why they didn't just include those sources as part of the default install.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Cannot execute binary file apt-get

#9 Post by stevepusser »

The installer disables them if it can't connect during the install.
MX Linux packager and developer

Post Reply