The issue occurs because the local RPM database (DB) is broken.
To resolve the issue, rebuild the local RPM DB:
- Run the commands below to back up the current RPM DB:
# cd /var/lib
# tar -zcvf /var/preserve/rpmdb-$(date +%Y-%m-%d_%H-%M-%S).tar.gz rpm - Verify the integrity of the package files using the following commands:
# cd /var/lib/rpm
# rm -f __db*
# /usr/lib/rpm/rpmdb_verify PackagesThe command # rm -f __db* is necessary to avoid stale locks. - Once the package files are verified, type the command below to rebuild RPM indexes:
# rpm -vv --rebuilddb