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

 

 

 

Can't install build-essential

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
johnnytheswede
Posts: 3
Joined: 2017-10-08 14:16

Can't install build-essential

#1 Post by johnnytheswede »

Hi Forums,

This is a problem with "you have held broken packages", unfortunately i do not know how to fix this. Could someone help me? This is what i am trying to do:

Code: Select all

# apt-get install build-essential
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:4.9.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
# 
A "uname -a" gives

Code: Select all

Linux athos 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2 (2017-04-30) x86_64 GNU/Linux

Kindest regards
Johnny

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Can't install build-essential

#2 Post by Head_on_a_Stick »

Please post the full output of:

Code: Select all

apt-cache policy
deadbang

johnnytheswede
Posts: 3
Joined: 2017-10-08 14:16

Re: Can't install build-essential

#3 Post by johnnytheswede »

Thank you Head_on_a_stick, here it is:

Code: Select all

Package files:
 100 /var/lib/dpkg/status
     release a=now
 500 http://httpredir.debian.org/debian/ testing/non-free Translation-en
 500 http://httpredir.debian.org/debian/ testing/main Translation-en
 500 http://httpredir.debian.org/debian/ testing/contrib Translation-en
-500 http://httpredir.debian.org/debian/ testing/non-free i386 Packages
     release o=Debian,a=testing,n=buster,l=Debian,c=non-free
     origin httpredir.debian.org
-500 http://httpredir.debian.org/debian/ testing/contrib i386 Packages
     release o=Debian,a=testing,n=buster,l=Debian,c=contrib
     origin httpredir.debian.org
-500 http://httpredir.debian.org/debian/ testing/main i386 Packages
     release o=Debian,a=testing,n=buster,l=Debian,c=main
     origin httpredir.debian.org
-500 http://httpredir.debian.org/debian/ testing/non-free amd64 Packages
     release o=Debian,a=testing,n=buster,l=Debian,c=non-free
     origin httpredir.debian.org
-500 http://httpredir.debian.org/debian/ testing/contrib amd64 Packages
     release o=Debian,a=testing,n=buster,l=Debian,c=contrib
     origin httpredir.debian.org
-500 http://httpredir.debian.org/debian/ testing/main amd64 Packages
     release o=Debian,a=testing,n=buster,l=Debian,c=main
     origin httpredir.debian.org
 500 https://repo.skype.com/deb/ stable/main amd64 Packages
     release o=. stable,a=stable,n=stable,l=. stable,c=main
     origin repo.skype.com
 500 https://deb.opera.com/opera-stable/ stable/non-free i386 Packages
     release o=Opera Software ASA,a=stable,n=stable,l=The Opera web browser,c=non-free
     origin deb.opera.com
 500 https://deb.opera.com/opera-stable/ stable/non-free amd64 Packages
     release o=Opera Software ASA,a=stable,n=stable,l=The Opera web browser,c=non-free
     origin deb.opera.com
 500 http://dl.google.com/linux/chrome/deb/ stable/main amd64 Packages
     release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main
     origin dl.google.com
 500 ftp://ftp.deb-multimedia.org/ jessie/non-free Translation-en
 500 ftp://ftp.deb-multimedia.org/ jessie/main Translation-en
 990 ftp://ftp.deb-multimedia.org/ jessie/non-free i386 Packages
     release v=8.9,o=Unofficial Multimedia Packages,a=oldstable,n=jessie,l=Unofficial Multimedia Packages,c=non-free
     origin ftp.deb-multimedia.org
 990 ftp://ftp.deb-multimedia.org/ jessie/main i386 Packages
     release v=8.9,o=Unofficial Multimedia Packages,a=oldstable,n=jessie,l=Unofficial Multimedia Packages,c=main
     origin ftp.deb-multimedia.org
 990 ftp://ftp.deb-multimedia.org/ jessie/non-free amd64 Packages
     release v=8.9,o=Unofficial Multimedia Packages,a=oldstable,n=jessie,l=Unofficial Multimedia Packages,c=non-free
     origin ftp.deb-multimedia.org
 990 ftp://ftp.deb-multimedia.org/ jessie/main amd64 Packages
     release v=8.9,o=Unofficial Multimedia Packages,a=oldstable,n=jessie,l=Unofficial Multimedia Packages,c=main
     origin ftp.deb-multimedia.org
 500 http://www.deb-multimedia.org/ jessie/non-free Translation-en
 500 http://www.deb-multimedia.org/ jessie/main Translation-en
 990 http://www.deb-multimedia.org/ jessie/non-free i386 Packages
     release v=8.9,o=Unofficial Multimedia Packages,a=oldstable,n=jessie,l=Unofficial Multimedia Packages,c=non-free
     origin www.deb-multimedia.org
 990 http://www.deb-multimedia.org/ jessie/main i386 Packages
     release v=8.9,o=Unofficial Multimedia Packages,a=oldstable,n=jessie,l=Unofficial Multimedia Packages,c=main
     origin www.deb-multimedia.org
 990 http://www.deb-multimedia.org/ jessie/non-free amd64 Packages
     release v=8.9,o=Unofficial Multimedia Packages,a=oldstable,n=jessie,l=Unofficial Multimedia Packages,c=non-free
     origin www.deb-multimedia.org
 990 http://www.deb-multimedia.org/ jessie/main amd64 Packages
     release v=8.9,o=Unofficial Multimedia Packages,a=oldstable,n=jessie,l=Unofficial Multimedia Packages,c=main
     origin www.deb-multimedia.org
 500 http://security.debian.org/ jessie/updates/main Translation-en
 990 http://security.debian.org/ jessie/updates/main i386 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=main
     origin security.debian.org
 990 http://security.debian.org/ jessie/updates/main amd64 Packages
     release v=8,o=Debian,a=oldstable,n=jessie,l=Debian-Security,c=main
     origin security.debian.org
 500 http://ftp.se.debian.org/debian/ jessie/non-free Translation-en
 500 http://ftp.se.debian.org/debian/ jessie/main Translation-en
 500 http://ftp.se.debian.org/debian/ jessie/contrib Translation-en
 990 http://ftp.se.debian.org/debian/ jessie/non-free i386 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=non-free
     origin ftp.se.debian.org
 990 http://ftp.se.debian.org/debian/ jessie/contrib i386 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=contrib
     origin ftp.se.debian.org
 990 http://ftp.se.debian.org/debian/ jessie/main i386 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=main
     origin ftp.se.debian.org
 990 http://ftp.se.debian.org/debian/ jessie/non-free amd64 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=non-free
     origin ftp.se.debian.org
 990 http://ftp.se.debian.org/debian/ jessie/contrib amd64 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=contrib
     origin ftp.se.debian.org
 990 http://ftp.se.debian.org/debian/ jessie/main amd64 Packages
     release v=8.9,o=Debian,a=oldstable,n=jessie,l=Debian,c=main
     origin ftp.se.debian.org
Pinned packages:

User avatar
4D696B65
Site admin
Site admin
Posts: 2696
Joined: 2009-06-28 06:09
Been thanked: 85 times

Re: Can't install build-essential

#4 Post by 4D696B65 »

jessie, stretch, and buster. Here we go again. :roll:

User avatar
RU55EL
Posts: 546
Joined: 2014-04-07 03:42
Location: /home/russel

Re: Can't install build-essential

#5 Post by RU55EL »

Please read the information at this link carefully!

DontBreakDebian from Debian Wiki.

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

Re: Can't install build-essential

#6 Post by stevepusser »

I consider this more data in favor of Kedeha's Conjecture.

Johnnytheswede, if you've installed many packages from this mishmash of sources, your apt system is probably now insane, and not worth the large effort to try and repair. Restoring from a sane backup or a reinstall is the best choice.
MX Linux packager and developer

User avatar
Head_on_a_Stick
Posts: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 132 times

Re: Can't install build-essential

#7 Post by Head_on_a_Stick »

@OP: that is some, erm, interesting pinning that you have going on there — would you care to share your /etc/apt/preferences file with the class so that we can all have a good laugh?
deadbang

johnnytheswede
Posts: 3
Joined: 2017-10-08 14:16

Re: Can't install build-essential

#8 Post by johnnytheswede »

Thank you all for your help. I have read the DebianWiki in an overarching way and for sure it seems that there is an aspect of maintaining a system that i have totally missed over the years ... package management has, as it seems today, been a totally blind spot for me. I have just installed what i needed and have never given any deeper thought to it. So your response to me is an incredibly valuable eye opener and i am extremely grateful for this.

My course of action will of course be to reinstall and after that stick to the advice given in the DebianWiki.

Head_on_a_stick, i would be happy to oblige, but the /etc/apt/preferences appears to be a directory, is there any particular file from in that you want to see? I would be very happy to share whatever file from that directory that could spread some joy :-)

Thanks again everyone!

Kindest regards
Johnny

Post Reply