1. Error message during Yum installation
#yum install net-tools
error: rpmdb: BDB0113 Thread/process 31403/139827795044416 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
CRITICAL:yum.main:
Error: rpmdb open failed
2. Solution
2.1 view the/var/lib/RPM directory
2.2 Delete the rpmdb files starting with __db in the /var/lib/rpm directory
rm -f /var/lib/rpm/__db*
2.3 RPM Database Reconstruction
rpm --rebuilddb
2.4 clean up all Yum caches
yum clean all
2.5 regenerate Yum cache
yum makecache