rpmdb open failed

Hi,

[root@localhost]# yum --skip-broken -y  update
rpmdb: Thread/process 6657/3078387392 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

note:
i'm using fedora 14 with kernel 2.6.35.12-88.fc14.i686

---------- Post updated at 19:57 ---------- Previous update was at 19:38 ----------

Oh sorry i got it !

1- rm /var/lib/rpm/__db*
2- yum --rebuilddb
3- yum -y update

1 Like

Thanks for sharing the solution with us.

1 Like

That's essentially the same error as

rpm -q <some_pkg>
rpmdb: Program version 4.3 doesn't match environment version
error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
package <some_pkg> is not installed

The problem is a corrupted rpm database, mostly coming into existence because of an aborted update process. It also happens sometimes when the package containing rpm itself is updated.

The solution is to delete and then rebuild the database:

# rm -f /var/lib/rpm/__db.[0-9][0-9]*
# rpm --quiet -qa

I hope this helps.

bakunin

1 Like

ya,that's right