yum update error with rpmdb
Created: 2022-11-30 01:28:32 | Last modified: 2022-11-30 01:31:41
Access: Read | Views: 10 | Rating: N/A | Tags:
error: rpmdb: BDB0113 Thread/process 837800/139662338987840 failed: BDB1507 Thread died in Berkeley DB library
When trying to run a yum update, I get the following message
[root@server ~]# yum update
error: rpmdb: BDB0113 Thread/process 837800/139662338987840 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
This is due to rpmdb corruption, to fix backup the rpm database and rebuild
mkdir /var/lib/rpm/bak
cp -a /var/lib/rpm/__db* /var/lib/rpm/bak/
rm -f /var/lib/rpm/__db.[0-9][0-9]*
rpm --quiet -qa
rpm --rebuilddb
yum clean all
Now run the yum update gain
[root@server ~]# yum update