Debian corrupt aptitude

Upgrading a Debian v6.0 Squeeze server to v7.1 Wheezy this evening and kept getting errors when trying to upgrade apt

The fix run the following commands

apt-get update –fix-missing

dpkg –configure -a

apt-get install -f

These all failed with dependency errors from apt

It was necessary to edit the dpkg status file manually.

nano /var/lib/dpkg/status    (you can use vi or nano instead of nano)

Locate the corrupt package in my case aptitude and remove the whole block of info about it and save the file.

dpkg –configure -a

apt-get update && apt-get upgrade

apt-get dist-upgrade

 

Leave a Reply

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