This error might output during yum operations or any rpm operations on Linux - based operating system:
# yum -y update |
The error above means your rpm database is corrupted and will block you to run any yum or rpm operations. To solve this issue, simply run the steps below to backup and rebuild the rpm database:
1. Run backup for the current rpm databases by creating a new directory for the current rpm databases backup. Copy the current files to the backup directory.
mkdir /var/lib/rpm/backup
cp -a /var/lib/rpm/__db* /var/lib/rpm/backup/
|
2. Remove the current rpm database files and rebuild the database with the following commands:
rm -f /var/lib/rpm/__db.[0-9][0-9]* rpm --quiet -qa rpm --rebuilddb |
3. Rebuild complete! You may trying running the yum command once again and see if the issue has resolved.