Today, I was testing Nginx web server in a CentOS 7 VM. In the middle of the update process, the power has gone. Since I don’t have any UPS, my host system went down immediately. After few minutes, the power came, and I turned on the VM again and started the upgrade process. When I run the “yum update” command, I get this:
Try this. Open a terminal and log in as root. Then change to /var/lib/rpm. Once in that folder delete the database files.
rm -f __*
Then, run the following command:
# yum clean all
That is two underscores before the asterisk. Then rebuild the database.
Once the database is rebuilt try your yum operation again.