rpmdb: Thread died in Berkeley DB library

rpmdb: Thread died in Berkeley DB library

If you see rpmdb errors in your control pane or during package management (during yum/rpm operations), like this:
 
rpmdb: BDB0113 Thread/process 4106/140140548798528 failed: BDB1507 Thread died in Berkeley DB library
 
or like
 
rpm '-qa' '--qf' '%{NAME} %{VERSION}
'
error: rpmdb: BDB0113 Thread/process 4106/140140548798528 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
error: rpmdb: BDB0113 Thread/process 4106/140140548798528 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 database in /var/lib/rpm
Runtime error: unable to execute: "rpm '-qa' '--qf' '%{NAME} %{VERSION}
'"
stdout: ''
stderr: 'error: rpmdb: BDB0113 Thread/process 4106/140140548798528 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
error: rpmdb: BDB0113 Thread/process 4106/140140548798528 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 database in /var/lib/rpm
'
description: 'exit Status: 1'
 
It means that the RPM database is corrupted.

Solution
 
Please follow these steps to backup and rebuild the rpmdb database:
 
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
  • yum, rpm, rpm operation, rpm error, vps management, OS issues, rpm package, rpm database issue
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Install / Reinstall OS

Operating system installation steps: Login to the Clients Area; Select at the top of menu the...

.htaccess - Fun with it !

Introduction The Apache web server has a number of configuration options that are available to...

500 Internal Server Error

Internal Server Error help, 500 error Internal server errors can be caused by a few different...

Cant Access my site?

We receive lots of queries from our client saying that why i'm not being able to access my site....

Do you provide AwStats?

Yes, we provide AWSTATS most of the servers of TechPlusHost.com and it is updated automatically...