Issue
When executing Yum you receive the following error,
[root@william-gce blog]# yum install npm rpmdb: Thread/process 3934/139752225695488 failed: Thread died in Berkeley 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
Solution
This can be caused by a corrupted rpm db. To fix delete the __db* files and then run rpm –rebuilddb. Heres an example,
[root@william-gce blog]# rm -f /var/lib/rpm/__* [root@william-gce blog]# rpm --rebuilddb
You will now be able to execute Yum.
[root@william-gce blog]# yum install npm Loaded plugins: fastestmirror, security Setting up Install Process Loading mirror speeds from cached hostfile * base: centos.vwtonline.net * epel: mirror.symnds.com * extras: mirror.5ninesolutions.com * updates: linux.cc.lehigh.edu * webtatic: us-east.repo.webtatic.com
Latest posts by Rick Donato (see all)
- NETCONF & YANG: Automate Network Configs via Python - April 2, 2026
- Palo Alto – How to Configure Your Next-Generation Firewall - April 2, 2026
- How to Harden Linux SSH: Keys, Fail2ban & Ciphers - March 1, 2026
Want to become a Linux expert ?
Here is our hand-picked selection of the best courses you can find online:
Linux Mastery course
Linux Administration Bootcamp
and our recommended certification practice exams:
Delta Practice Tests