rpm deadlock

A problem happens when I ran "rpm -ivh xxxx.rpm" or "rpm -qa | grep xxx"

The rpm command didn't give any output, looks like there's no response, it's called "rpm deadlock"

To resolve this issue, we should rebuild rpm database, steps are:

1. backup /var/lib/rpm by rinning "cp -R /var/lib/rpm /var/lib/rpm.bak"
2. delete db files in /var/lib/rpm by running "rm /var/lib/rpm/__db.*"
3. rebuild rpm database by running "rpm --rebuilddb"
(4. rm /var/lock/rpm/transaction)

If step #3 meets "warning: waiting for transaction lock" error, please run step #4, then run #3 again.

Note all commands should be run with root permission

This should resolve the issue. If "rpm -qa" returns nothing after rebuilddb, please copy Packages from backup to /var/lib/rpm


你可能感兴趣的:(职场,rpm,deadlock,休闲,rebuilddb)