error: rpmdb: … DB_RUNRECOVERY Fatal error, run database recovery

Getting DB_RUNRECOVERY error from yum/rpm, what can you do to fix it? The error messages look something like this:

$ sudo yum install google-chrome-stable
error: rpmdb: Thread/process 9662/3077695168 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
CRITICAL:yum.main:
Error: rpmdb open failed

 

To fix this problem:

sudo rm -rf /var/lib/rpm/__db.00?
sudo rpm --rebuilddb

One thought on “error: rpmdb: … DB_RUNRECOVERY Fatal error, run database recovery

Leave a Reply

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