Rpmdb error in log file

Benjamin J. Weiss benjamin at birdvet.org
Mon Jan 3 13:41:01 UTC 2005


Ryan Golhar wrote:

>Looking into it more, it looks like after RedHat released Update 4 for
>EL WS, some package got upgraded and now the rpm database can't be read.
>
>
>I'm not sure how to fix this, or even where to begin other than
>rebuilding my workstations...
>
><snip>
>
>Hi all,
>
>I went away on vacation for the last two weeks and came back to find all
>my machines reporting the following error in the nightly cron log:
>
>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
>
>
>It repeats this many times over.  I tried running up2date but get the
>same error.  Any ideas?
>
>  
>
Ryan,

I'm not having this problem, but if it is indeed an RPM database issue, 
you can rebuild it with the following:

rm -f /var/lib/rpm/__db.00?
rpm --rebuilddb

That *should* take care of it, I hope.

HTH,

Ben




More information about the redhat-list mailing list