Your RPM database may be corrupted. So we need to rebuild the rpm database after deleting all rpm dbs from /var/lib/rpm.

Here are the steps:

rm /var/lib/rpm/__db.*

rpm –rebuilddb.