From SpectLog
Jump to: navigation, search


Yum does not work printing the following error:

error: rpmdb: Thread/process 2842/140571270571776 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db4 -  (-30974)
error: cannot open Packages database in /var/lib/rpm

Error: rpmdb open failed


The safest solution is to remove temporary files (which get recreated if missing) []:

rm -f /var/lib/rpm/__db*

The second option is to rebuild RPM database (backup the files first):

cp -pr /var/lib/rpm ~/rpm 
rpm -vv --rebuilddb