If you see rpmdb errors during package management (during yum/dnf/rpm operations) like this:
rpmdb: Thread/process 10605/3765405599488 failed: Thread died in Berkeley DB lib rary
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run d atabase 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
This means the Operating Systems software database (RPM data) has become corrupted. To fix this issue, run these commands as root:
# 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