May 22, 2009 Archives

22-05-2009 17:12

RPM db corruption

Ever got an error like this and don't know how to solve it?

[david.ward@install02 /var/lib/rpm]$ sudo rpm -qa|grep rpm
rpmdb: Program version 4.3 doesn't match environment version
error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm

Well the solution is simply, as root:

rm /var/lib/rpm/__* && rpm --rebuilddb

Posted by DaveQB | Permanent Link | Categories: IT