When I want to install a package on CentOS, I get the following error:
error: rpmdb: BDBO113 Thread/process1737/140177568220736 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error (-30973) from dbenv->failchk: BDBO087 DB_RUNRECOVERY: Fatal error, run datapase recovery
error: cannot open Packages index using db5 (-30973)
error: cannot open Packages database in /var/1ib/rpm
Error : Error: rpmdb open failed
Problem
How to fix thread died in Berkeley DB library?
Solution
This issue is caused when the rpm process accessing the Berkeley DB library is interrupted either during the current run or at some other time so the RPM database is corrupted. These are the commands to fix the problem:
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
Note
In my experience, usually, this error occurs when we suddenly cancel the ongoing yum process. Therefore, we should have to wait for the ongoing yum process if we don’t want to get this error to reappear.
References
cloudlinux.zendesk.com
dba010.com
docs.vmware.com
access.redhat.com
Thanks, fixed it!
Glad to help.