Aptitude kept back on Ubuntu 12.04

The occaisonal Ubuntu quirks continue. I’ve received a lot of positive feedback and hits on my other fix posts, and the amazing Nate Lawson said I should keep doing them, so here’s another quickie.

I found aptitude failing updates in the GUI (Update Manager) patch cycle, so I switched into terminal to read the output and check what’s what.

user@system:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  aptitude
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
user@system:

The failed package is clearly only “aptitude”. More info can be gleaned by looking at the install error for just that package.

user@system:~$ sudo apt-get install aptitude

That command made the system complain about dependency in libapt-pkg4.12.

I checked the update status for libapt-pkg4.12.

The update site showed “Latest version: 0.8.16~exp12ubuntu10.5” from 2012-10-24 18:06:55 UTC. I then checked my system and I still had 0.8.16~exp12ubuntu10.2 (2012-06-15 23:06:45 UTC). Not good. Fortunately I could see 10.2 was the latest security update (CVE-2012-0954 CVSS v2 Base Score:2.6) but the expectation of 10.5 was causing the update error.

Proceed at your own risk but this was the straightforward fix.

  1. Download the latest package, based on architecture:
    wget http://security.ubuntu.com/ubuntu/pool/main/a/apt/libapt-pkg4.12_0.8.16~exp12ubuntu10.5_amd64.deb
  2. Force removal of old package:
    sudo dpkg --force-depends -r libapt-pkg4.12
  3. Install new package you just downloaded in step 1:
    sudo dpkg -i libapt-pkg4.12_0.8.16~exp12ubuntu10.5_amd64.deb

    This can be verified in /var/log/dpkg.log: “status installed libapt-pkg4.12 0.8.16~exp12ubuntu10.5”

  4. Upgrade and see if all dependencies are met:
    sudo apt-get upgrade

It’s simple but annoying, especially on a LTS system.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.