Issue
When executing Yum you receive the following error,
[[email protected] 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,
[[email protected] blog]# rm -f /var/lib/rpm/__* [[email protected] blog]# rpm --rebuilddb
You will now be able to execute Yum.
[[email protected] 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)
- How to Configure a BIND Server on Ubuntu - March 15, 2018
- What is a BGP Confederation? - March 6, 2018
- Cisco – What is BGP ORF (Outbound Route Filtering)? - March 5, 2018
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:
AlphaPrep Practice Tests - Free Trial