![]() ![]() It is a simple and easy-to-use tool which you can run without option. We also discovered the dcrpm (detect and correct rpm) command line tool used to identify and correct well known issues to do with RPM database corruption. ![]() Rebuild RPM Database Use dcrpm Tool to Detect and Correct RPM Database Last but not least, rebuild the RPM database using the following command, the -vv option allows for displaying lots of debugging information. # rpm -qa >/dev/null #output is discarded to enable printing of errors only Now to check the database headers, query all installed packages using the -q and -a flags, and try to carefully observe any error(s) sent to the stderror. # /usr/lib/rpm/rpmdb_dump Packages.back | /usr/lib/rpm/rpmdb_load Packages ![]() Also verify the integrity of the freshly loaded Packages file as follows. In case the above operation fails, meaning you still encounter errors, then you should dump and load a new database. # /usr/lib/rpm/rpmdb_verify /var/lib/rpm/Packages Next, verify the integrity of the master package metadata file /var/lib/rpm/Packages this is the file that needs rebuilding, but first remove /var/lib/rpm/_db* files to prevent stale locks using following commands. # tar -zcvf /backups/rpmdb-$(date +"%d%m%Y").tar.gz /var/lib/rpm First start by backing up your current RPM database before proceeding (you might need it in the future), using the following commands. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
May 2023
Categories |