Sometimes you may get the below error while running “rpm -qa” or any other rpm listing command. This error suggests that the RPM db is corrupted and you need to clean it up.

rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30977) from dbenv->open: DB_RUNRECOVERY

Here are the steps to do it.

  1. Remove the rpm db lock information files

    rm -f /var/lib/rpm/__db*

  2. Run the rpm rebuild database command . The rpm –rebuilddb option will rebuild the database indices from the installed RPM package headers. This process will take a while to complete. Once it is completed, the rpm -qa and other rpm listing commands will work.

    rpm –rebuilddb

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like
Read More

Download using wget

You can use “wget” on Linux machine CLI to download files from http or ftp sites. Proxy configuration…