unable to install gcc-multilib after upgrading to 14.04

21,451

I do not often use aptitude, but in case of problems with different gcc versions and unmet dependencies, apt-get is some times unable to correct problems saying "you have held broken packages"

That's the day, you should install aptitude, and try to install the package you wish. It clearly shows all dependencies and makes not only one suggestion.

First suggestions is often the same apt-get would do, but if you click "no" aptitude will show you another one, which maybe fits your needs better.

Give it a try!


Answer is a little late, but I often searched for problems like these and was happy about different solutions.

Share:
21,451

Related videos on Youtube

user368823
Author by

user368823

Updated on September 18, 2022

Comments

  • user368823
    user368823 over 1 year

    I recently upgraded from 12.04 to 14.04. After upgrading things started to break.

    I am getting crt1.o: No such file: No such file or directory. So, I tried to install gcc-multilib, but, that is also running into errors.

    $ sudo apt-get install gcc-multilib
    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:
     gcc-multilib : Depends: gcc-4.8-multilib (>= 4.8.2-5~) but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    

    I tried

    $ sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Calculating upgrade... Starting pkgProblemResolver with broken count: 0
    Starting 2 pkgProblemResolver with broken count: 0
    Done
    Done
    Starting pkgProblemResolver with broken count: 0
    Starting 2 pkgProblemResolver with broken count: 0
    Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    

    I tried to post the output of the following commands but I am unable to do it.

    cat /etc/apt/sources.list
    cat /etc/apt/sources.list.d/*
    

    How can I resolve this?

     $ sudo apt-get install gcc-4.8-multilib
    
     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:
      gcc-4.8-multilib : Depends: lib32gcc-4.8-dev (= 4.8.2-19ubuntu1) but it is not going to be installed
                        Depends: libx32gcc-4.8-dev (= 4.8.2-19ubuntu1) but it is not going to be installed
     E: Unable to correct problems, you have held broken packages.
    


     $ sudo apt-get install lib32gcc-4.8-dev
    
     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:
      lib32gcc-4.8-dev : Depends: lib32gcc1 (>= 1:4.8.2-19ubuntu1) but it is not going to be installed
                        Depends: libx32gcc1 (>= 1:4.8.2-19ubuntu1) but it is not going to be installed
                        Depends: lib32asan0 (>= 4.8.2-19ubuntu1) but it is not going to be installed
                        Depends: libx32asan0 (>= 4.8.2-19ubuntu1) but it is not going to be installed
     E: Unable to correct problems, you have held broken packages.
    


    $ sudo apt-get install lib32gcc1 libx32gcc1 lib32asan0 libx32asan0
    
     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:
      lib32gcc1 : Depends: gcc-4.9-base (= 4.9-20140406-0ubuntu1) but 4.9.1-0ubuntu1 is to   be installed
      libx32gcc1 : Depends: gcc-4.9-base (= 4.9-20140406-0ubuntu1) but 4.9.1-0ubuntu1 is    to be installed
     E: Unable to correct problems, you have held broken packages.
    
    
    
     $ apt-cache policy lib32gcc-4.8-dev  lib32gcc1 gcc-4.9-base
    
     lib32gcc-4.8-dev:
      Installed: (none)
      Candidate: 4.8.2-19ubuntu1
      Version table:
         4.8.2-19ubuntu1 0
            500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
     lib32gcc1:
      Installed: (none)
      Candidate: 1:4.9-20140406-0ubuntu1
      Version table:
         1:4.9.1-0ubuntu1 0
            100 /var/lib/dpkg/status
         1:4.9-20140406-0ubuntu1 0
            500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
     gcc-4.9-base:
      Installed: 4.9.1-0ubuntu1
      Candidate: 4.9.1-0ubuntu1
      Version table:
     *** 4.9.1-0ubuntu1 0
            100 /var/lib/dpkg/status
         4.9-20140406-0ubuntu1 0
            500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
    

    Link to the output of sudo apt-get update: http://paste.ubuntu.com/9810181/

    • user368823
      user368823 over 9 years
      I have already tried the following steps sudo apt-get autoremove sudo apt-get update sudo apt-get dist-upgrade sudo dpkg --configure -a
    • g_p
      g_p over 9 years
      If you have added any third party ppa, disable that from Software and Updates--> Other Software. Also post the output of sudo apt-get install gcc-4.8-multilib
    • user368823
      user368823 over 9 years
      @g_p: Updated with the output o sudo apt-get install gcc-4.8-multilib. Also removed 2rd paty ppa's. Thanks!
    • user368823
      user368823 over 9 years
      Ran both "sudo apt-get update" followed by "sudo apt-get upgrade", I still the get the same errors.
    • user368823
      user368823 over 9 years
      Updated the question with the output of apt-cache policy lib32gcc-4.8-dev lib32gcc1 gcc-4.9-base
    • g_p
      g_p over 9 years
      Can you post the output of sudo apt-get update on paste.ubuntu.comand provide a link in question.
    • user368823
      user368823 over 9 years
      Update the question with the link to the output of sudo apt-get update