United States (change)
Shortcuts: Downloads Fedora Red Hat Network
Account Links: Cart Your Account Logout
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
This is a bug, which has been observed after the release of Update 4 for Red Hat Enterprise Linux 3. This issue is resolved in later releases of Red Hat Enterprise Linux 3.
Workaround:
The less invasive way to resolve this problem is to reboot the system. If the system cannot be rebooted or if a reboot does not resolve the issue, the following will work.
To fix this issue and to allow the updates to continue, remove all files starting with __db in /var/lib/rpm directory.
Warning: Before executing this command ensure that rpm, rpmq, up2date or rhnsd processes are not running.
# rm -rf /var/lib/rpm/__db*
The problem is caused by an incompatibility to the RPM database. the RPM database can be rebuilt with the following command (after removing the /var/lib/rpm/__db* files):
# rpm --rebuilddb