Yum error: Fix rpmdb: Thread died in Berkeley DB library

error: rpmdb: BDB0113 Thread/process 15171/139893381056576 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

To resolve this error, follow the below steps.

Step1: Create a backup folder.

#mkdir /var/lib/rpm/backup

Step2: Copy current rpm database to backup folder

#cp -a /var/lib/rpm/__db* /var/lib/rpm/backup/

Step3: Remove the current rpm database

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

Step4: Rebuild rpm database

#rpm --quiet -qa
#rpm --rebuilddb

Step5: Clean yum cache

#yum clean all

That's all……..

Leave a Reply

Your email address will not be published. Required fields are marked *