7/17/20

Error: Rpmdb changed underneath us

Problem:

Ran into this error while attempting to apply a yum update on a CentOS 6 machine to update its kernel packages.
Error: Rpmdb changed underneath us 
The same scenario applies if you get this error as well:
error: can not open Packages database in /var/lib/rpm

Cause:

The problem has to do with corruption in the RPM database files under the /var/lib/rpm directory.

Solution:

  • Check for any processes that might be currently running and having a lock on the rpm database and kill them if they exist:
    • ps -aufx | grep /var/lib/rpm
  • Delete the temporary DB files:
    • rm -fv /var/lib/rpm/__*\
  • Rebuild your server RPM database using the below command:
    • rpm --rebuilddb -v -v

After completing these steps, attempt to run a "yum update" again and it most likely would work fine now. 
It worked for me.



Original Solution Post:

Quick HTTP to HTTPS - Apache2

There are several methods for redirecting your Apache-based website visitors who might type your servers URL using the plain (non-secure) HT...