If rpm / yum command hangs incessantly during operations or you see error messages, it likely means your RPM database has become corrupted.
/var/lib/rpm/ stores the RPM database information, so to resolve you can just delete and rebuild the database using one of the two methods below like so:
Method # 1
rm -f /var/lib/rpm/__db*
rpm –rebuilddb -v -v
Method # 2
If you are still getting errors, then try your luck with following commands:
Tweet# mv Packages Packages-BAKUP
# db_dump Packages-BAKUP | db_load Packages
# rpm -qa
# rpm –rebuilddb
Erik
Friday, December 17, 2010
linux administration - tips, notes and projects
No Comment