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
rm -f /var/lib/rpm/__db.*
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.