rpmdb: unable to join the environment

If your rpm database gets corrupt, you receive the following message on working on packages using rpm:

rpmdb: unable to join the environment
rpmdb: write: 0xbf91a7d0, 8192: Invalid argument
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index

You can try out any of the following two solutions:
1.
rm -f /var/lib/rpm/__db*
rpm –rebuilddb

OR

2. you need to add the following ‘export’ line in /etc/profile file and rebuild the database.
export LD_ASSUME_KERNEL=2.2.5 (2.2.5 is the base kernel)
rpm –rebuilddb

With the second solution, the changes will take effect on the next session.

This entry was posted on Tuesday, September 22nd, 2009 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.