Ubuntu – Unable to correct problems, you have held broken packages

apt

After upgrading from 10.04 to 12.04 I am trying to install different packages.
For instance ia32-libs and skype (4.0).

When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.

Output of commands:

sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

After running this:

sudo dpkg --configure -a
foo@foo:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Best Answer

  • That particular error message may indicate that you have held packages, but it may also indicate a different problem.

    You can get a list of actual held packages with:

    dpkg --get-selections | grep hold
    

    If there are none, or none look related, then it's probably something else. Check carefully the output of the command you were trying when you got the error message, as there may be other clues in the full output from that command, aside from the error message.

    Another method of troubleshooting may be to use aptitude rather than apt-get to try to install your package:

    sudo aptitude install <packagename>
    

    Aptitude will give up less easily, and will attempt to find solutions which may involve modifying other packages. It may give you more explanation of the problem and options for fixing it.

    Occasionally aptitude will be too eager to remove or downgrade large numbers of packages to satisfy your request, in which case retrying with -f changes its priorities and helps it come up with solutions that involve removing/downgrading fewer packages even if it means not all changes you requested can go ahead:

    sudo aptitude -f install <packagename>
    
  • Related Question