transparently corrupt apt/dpkg db
For reasons I cannot determine, when I run aptitude now, it wants to do things with various packages, including upgrading them, putting them on version hold, or uninstalling them.
What let to this is trying to install proftpd. I first tried "proftpd-basic" because I didn't want everything. That installed OK, but didn't run (it gave a message about a missing module). So I tried "proftpd". But that installed all the modules. So I uninstalled that and tried "proftpd-basic" again. The same error appeared. So I went to just uninstall "proftpd-basic" and just leave it that way. This time, red messages showed up about package suggestions and dependencies. It was wanting to uninstall my existing kernel and install a xen kernel. What would cause this? I quit and ran aptitude again. Now it wants to upgrade a lot of stuff (about 35 packages). I quit and run again. Now it wants to uninstall about 105 packages. So I think some database go corrupted. I run backups daily. So my aim now is to just restore the database from backup and start over. What files need to be fetched from the backup and replaced? Do any files need to be removed that might have been added (aside from the latent "proftpd-basic" package I did not get to uninstall). If the restore-from-backup goes OK, my next plan is to install "proftpd-basic" again, then just uninstall it, and give up on proftpd. |
/var/lib/dpkg
If you're not already, you should make the output of Code:
dpkg --get-selections Code:
dpkg --set-selections < filename Code:
aptitude -s -f install |
I'm going to wait until tonight's normal backup runs. Then I'll have the before and after. That's when I'll restore /var/lib/dpkg to it's previous state.
Here is the contents of /etc/apt/sources.list: Code:
# deb http://ftp.us.debian.org/debian lenny main Code:
Script started on Sat Jul 4 16:53:54 2009 |
I have a cron script that runs daily to do "dpkg -l" and archive the outputs each time there is a difference relative to the previously archived output. Here is the diff between the last archived and manually running that script today:
Code:
--- debian-packages-log/debian-packages-2009-06-29.txt 2009-06-29 00:01:01.000000000 -0400 |
Quote:
Code:
@@ -55,8 +55,8 @@ Or should I just "rm" the files shown in "/var/lib/dpkg/info/proftpd-basic.list" and "/var/lib/dpkg/info/proftpd-doc.list" ? |
Well, yup, something is very wrong, but your sources look fine. Did you apt-get update (or aptitude update)? Post the contents of /etc/apt/preferences if it exists.
What kernel are you running now? What kernel packages are installed? It wants to pull in many different kernels and that is wrong. Can you try removing all proftp packages? |
Quote:
The file "/etc/apt/preferences" does not exist. Quote:
Code:
ampere/root/c0 /root 330# uname -a Quote:
|
I replaced all the files in /var/lib/dpkg back to their original state before the package mess happened. When I do "aptitude -s -f install" it still does the same thing. It still tries to install packages I should not have.
Do I need to rebuild the dpkg database from scratch? |
Solved
This was solved, apparently. The command was "aptitude keep-all". It appears to abandon all previous delete, upgrade, or install requests.
|
All times are GMT -5. The time now is 04:28 PM. |