CentOS and yum - Error: rpmdb open failed
Today I had Ansible reporting an error on one of my CentOS machines while performing the usual upgrade procedure. I SSH’d into the host to check what was wrong and run yum clean all && yum update manually just to be greeted with the following error: rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30974) from dbenv->open: 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 The solution to the issue luckily was fairly simple and quick: …