2

I think I mistakenly deleted a gcc package from the system (Ubuntu 14.04). and now can't install anything on my system. Below is a sample output when I try apt-get -f install. Please Help!

root@ko-buntu:~/Downloads# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 arduino-core : Depends: gcc but it is not installable
 build-essential : Depends: gcc (>= 4:4.4.3) but it is not installable
 devscripts:i386 : Depends: perl:i386 but it is not installable
                   Depends: python3:i386 but it is not installable
                   Recommends: at:i386 but it is not installable
                   Recommends: dctrl-tools:i386 but it is not installable
                   Recommends: dput:i386 but it is not installable or
                               dupload:i386 but it is not installable
                   Recommends: libdistro-info-perl:i386 but it is not installable
                   Recommends: libencode-locale-perl:i386 but it is not installable
                   Recommends: libjson-perl:i386 but it is not installable
                   Recommends: libparse-debcontrol-perl:i386 but it is not installable
                   Recommends: liburi-perl:i386 but it is not installable
                   Recommends: libwww-perl:i386 but it is not installable
                   Recommends: python3-debian:i386 (>= 0.1.15) but it is not installable
                   Recommends: python3-magic:i386 but it is not installable
                   Recommends: strace:i386 but it is not installable
                   Recommends: wdiff:i386 but it is not installable
 dpkg-dev : Depends: binutils but it is not installable
            Recommends: gcc but it is not installable or
                        c-compiler
 g++ : Depends: gcc (>= 4:4.8.2-1ubuntu6) but it is not installable
       Depends: gcc-4.8 (>= 4.8.2-5~) but it is not installable
 g++-4.8 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
           Depends: gcc-4.8 (= 4.8.4-2ubuntu1~14.04) but it is not installable
 gcc:i386 : Depends: cpp:i386 (>= 4:4.8.2-1ubuntu6) but it is not installable
 gcc-4.8:i386 : Depends: cpp-4.8:i386 (= 4.8.2-19ubuntu1) but it is not installable
                Depends: libgcc-4.8-dev:i386 (= 4.8.2-19ubuntu1) but it is not installable
 gcc-4.9-base : Breaks: gcc-4.9-base:i386 (!= 4.9-20140406-0ubuntu1) but 4.9.1-0ubuntu1 is installed
 gcc-4.9-base:i386 : Breaks: gcc-4.9-base (!= 4.9.1-0ubuntu1) but 4.9-20140406-0ubuntu1 is installed
 hardening-includes : Depends: binutils but it is not installable
 libasan0 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
 libatomic1 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
 libcodeblocks0 : Depends: binutils (>= 2.14.90.0.7) but it is not installable
 libgcc-4.8-dev : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
 libgcc1:i386 : Depends: gcc-4.9-base:i386 (= 4.9-20140406-0ubuntu1) but 4.9.1-0ubuntu1 is installed
 libgomp1 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
 libitm1 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
 libquadmath0 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
 libstdc++-4.8-dev : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
 libstdc++6 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
 libtool : Depends: gcc but it is not installable or
                    c-compiler
           Recommends: libltdl-dev but it is not installable
 libtsan0 : Depends: gcc-4.8-base (= 4.8.4-2ubuntu1~14.04) but 4.8.2-19ubuntu1 is installed
 lintian : Depends: binutils but it is not installable
 pptp-linux : Depends: binutils but it is not installable
 sa-compile : Depends: gcc but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
root@ko-buntu:~/Downloads# 
3
  • It seems there be a mixture of different gcc-related packages installed. Decide for one version and install the related packages, if necessary by hand (dpkg). Do not forget to run apt-get update.
    – jofel
    Jul 14, 2015 at 11:41
  • @jofel It's possible to have multiple versions of gcc installed (4.8 and 4.9 here) without problems. Jul 14, 2015 at 11:57
  • @StephenKitt Yes, of course. But the problem seems here are mixture of the same minor version, like packages depending on 4.8.4-2ubuntu1~14.04 while having 4.8.2-19ubuntu1 installed, or dependencies on 4.9.1-0ubuntu1 and 4.9-20140406-0ubuntu1 in parallel.
    – jofel
    Jul 14, 2015 at 12:30

1 Answer 1

1

You need to remove the various i386 packages which are causing issues:

apt-get purge devscripts:i386 gcc:i386 gcc-4.8:i386 gcc-4.9-base:i386 libgcc1:i386

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .