Fix rpmdb: Thread died in Berkeley DB library – Error: rpmdb open failed

If you see rpmdb errors during package management (during yum/rpm operations), like this:

error: rpmdb: BDB0113 Thread/process 24360/139705672034368 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 – (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:Error: rpmdb open failed


Please follow these steps to backup and rebuild rpmdb database:

mkdir /var/lib/rpm/backup
cp -a /var/lib/rpm/__db* /var/lib/rpm/backup/
rm -f /var/lib/rpm/__db.[0-9][0-9]*
rpm –quiet -qa
rpm –rebuilddb
yum clean all
Share this Story:
  • facebook
  • twitter
  • gplus

About bentech4u

Leave a comment