Clear yum Cache Error: rpmdb: Thread/process 24307/140520328255392 failed: Thread died in Befkeley DB library

Error prompt after executing the command:

[root@redhat]# yum clean all
rpmdb: Thread/process 24307/140520328255392 failed: Thread died in Befkeley 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

#Rpmdb: thread/process 24307/140520328255392 failed: thread died in befkeley DB Library
# error: db3 error (- 30974) from dbenv – › failchk: DB_ Runrecovery: fatal error, running database recovery
# error: unable to open package index using db3 – (- 30974)
# error: unable to open packages database in/var/lib/rpm
# key: yum.main:
#
# error: rpmdb open failed

In this case, the RPM database is damaged, which makes the yum and RPM related commands unusable. The above also prompts/var/lib/rpm, which is the path where the temporary files of the RPM database are located.

Solution:

Rebuild RPM database

#Go to the path where rpmdb is located
cd /var/lib/rpm/
#List related files to find __db.*
ls
#Delete or move the rpmdb file, I created a new directory and moved the file
mkdir old
mv _db.* old/
#Rebuild the rpm database after completion
rpm --rebuilddb

After the reconstruction is completed, execute Yum clean all again to solve the problem

Similar Posts: