Difference between revisions of "Miscellaneous rpm issues"
From Notes_Wiki
(Created page with "<yambe:breadcrumb>Rpm|Rpm</yambe:breadcrumb> =Miscellaneous rpm issues= ==Finding which package installed given file== Many times we require to know the name of the page wh...") |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[System administration tools]] > [[Package management tools]] > [[Rpm|rpm]] > [[Miscellaneous rpm issues]] | |||
Line 12: | Line 11: | ||
==Resolving rpm database corruption error== | ==Resolving rpm database corruption error or repairing RPM database== | ||
Sometimes rpm or yum can give following error: | Sometimes rpm or yum can give following error: | ||
Line 23: | Line 22: | ||
which can be resolved using following steps: | which can be resolved using following steps: | ||
<pre> | <pre> | ||
ps aux | grep rpm | |||
#Ensure no rpm command is running | |||
#Move lock files to /tmp | |||
mkdir /root/rpm-db-temp | |||
mv /var/lib/rpm/__db* /root/rpm-db-temp/ | |||
db_verify /var/lib/rpm/Packages | db_verify /var/lib/rpm/Packages | ||
rpm --rebuilddb | rpm --rebuilddb | ||
</pre> | </pre> | ||
After this again try the failing yum or rpm command. | |||
Refer: | |||
* https://ma.ttias.be/yum-update-db_runrecovery-fatal-error-run-database-recovery/ | |||
* https://www.thegeekdiary.com/how-to-recover-from-a-corrupt-rpm-database-rebuilding-an-rpm-database/ | |||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[System administration tools]] > [[Package management tools]] > [[Rpm|rpm]] > [[Miscellaneous rpm issues]] |
Latest revision as of 12:19, 28 July 2022
Home > CentOS > CentOS 6.x > System administration tools > Package management tools > rpm > Miscellaneous rpm issues
Finding which package installed given file
Many times we require to know the name of the page which installed a given file. In such cases one can use:
rpm -qf <full-path-of-file>
to list the name of the rpm package.
Resolving rpm database corruption error or repairing RPM database
Sometimes rpm or yum can give following error:
rpmdb: Thread/process 6672/140703954818816 failed: Thread died in Berkeley DB library error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db3 - (-30974) error: cannot open Packages database in /var/lib/rpm
which can be resolved using following steps:
ps aux | grep rpm #Ensure no rpm command is running #Move lock files to /tmp mkdir /root/rpm-db-temp mv /var/lib/rpm/__db* /root/rpm-db-temp/ db_verify /var/lib/rpm/Packages rpm --rebuilddb
After this again try the failing yum or rpm command.
Refer:
- https://ma.ttias.be/yum-update-db_runrecovery-fatal-error-run-database-recovery/
- https://www.thegeekdiary.com/how-to-recover-from-a-corrupt-rpm-database-rebuilding-an-rpm-database/
Home > CentOS > CentOS 6.x > System administration tools > Package management tools > rpm > Miscellaneous rpm issues