Views:

The issue occurs because the local RPM database (DB) is broken.

To resolve the issue, rebuild the local RPM DB:

  1. 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

  2. Verify the integrity of the package files using the following commands:

    # cd /var/lib/rpm
    # rm -f __db*
    # /usr/lib/rpm/rpmdb_verify Packages

     
    The command # rm -f __db* is necessary to avoid stale locks.
  3. Once the package files are verified, type the command below to rebuild RPM indexes:

    # rpm -vv --rebuilddb