LinuxHelps.com

A blog for Linux Lovers.

10
Mar 2009
Rebuilding Rpmdb
Posted in Linux Administration by sibu at 10:03 am |

Getting the following error while running up2date

rpmdb: Program version 4.2 doesn’t match environment version
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm

Steps to resolve

1. Check for processes holding the rpm database open (usually in MUTEX/FUTEX states):

lsof | grep /var/lib/rpm

If it finds any, kill -9 them all.

2. Delete any temporary DB files:

rm -fv /var/lib/rpm/__*

3. Rebuild your RPM database:

rpm –rebuilddb -v -v

If you still have problems, a reboot is probably quickest, then repeat steps 2 and 3 above.


You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply