Account Links: Cart | Your Account | Logout

Skip to content

Red Hat Knowledgebase

Red Hat Knowledgebase Search:

Updated Within the Last:

New Solutions within the last day New Solutions within the last week New Solutions within the last month

Browse by topics:


Click to View a Topic
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<  37 of 593 >>

Solution Tools:


Email a Solution Postcard Printer version Submit a comment on this answer Update notifications Request an answer Back

Article Reference

Article ID: 4685
Last update: 04-09-08
Issue:
Why does the Red Hat Update Agent (up2date) return the error 'rpmdb: Program version 4.2 doesn't match environment version' after updating my Red Hat Enterprise Linux 3 machine to Update 4?
Resolution:
Release Found: Red Hat Enterprise Linux 3 Update 4

Symptom:
This would occur in systems which are set to automatically update using up2date. The following error it received after updating Red Hat Enterprise Linux 3 machine to Update 4:

 
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
      


Solution:

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
      


How well did this entry answer your question?


good wrong incomplete out of date
Red Hat Enterprise Linux > AS/ES/WS v. 3 > Issue <<   37  of  593  >>