rpmdb: unable to join the environment

by damonp on September 10, 2007

This weekend I was contacted by a client regarding a server that had run out of room on the main hard drive. Among the things that were corrupted by the drive filling up was the RPM database.

When trying to query of upgrade any package, the error message

rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm
warning: /root/webmin-1.360-1.noarch.rpm: V3 DSA signature: NOKEY, key ID 11f63c51
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages database in /var/lib/rpm
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages database in /var/lib/rpm

A search turned up this howto on repairing the db.

These two commands made quick work of the fix. First remove any old lock files:

rm -f /var/lib/rpm/__db*

Then rebuild the RPM database:

rpm -vv --rebuilddb

Popularity: 6% [?]

{ 3 comments… read them below or add one }

mahbubeh October 8, 2009 at 2:03 am

thank you so much for your useful content

Reply

Peter December 15, 2009 at 10:59 pm

Ditto. This was very useful. Thank you

Reply

Erik January 21, 2010 at 6:24 pm

Thanks very much, this fixed my problem within seconds!

Reply

Leave a Comment

Previous post:

Next post: