Living on the bleeding edge – repricutions

Today I upgraded my Mandriva Linux cooker installation, and in the process, RPM was upgraded to version 4.4.4, which of course trashed the rpm package database.

After the upgrade any call to RPM would result in the following error being produced:
rpmdb: Program version 4.4 doesn't match environment version 0.610

This is an inherent problem in the rpmdb implementation which I have no idea why it wasn’t fixed yet upstream – it shouldn’t be that hard to automatically convert the database upon detecting an older version. Still the solution currently isn’t all that complicated (just incredibly annoying – at the least rpmdb should have put out an explanation message or a link to an article that explains the problem and how to solve it, but apparently RPM developers believe in cryptic error messages):

  • Delete all files that look like __db.* under /var/lib/rpm:
    rm -f /var/lib/rpm/__db.*
  • run rpm --rebuilddb

The last command starts a lengthy process which can take up to 5 minutes.

I wonder what database backends other software management solutions use? I think that gentoo’s emerge uses text files, I’m not sure what apt is using though.

One Response to “Living on the bleeding edge – repricutions”

  1. stephane:

    i had the same problem on the same OS a few minutes ago, and your trick realy helped. actualy, cryptic error message make me sure i wont have too many answers from google 🙂

Leave a Reply to stephane



Spam prevention powered by Akismet