From The System Administrator Zone


RPM Hangs|RPM hangs forever...

Every now and again, RPM hangs forever.

The problem happens when a process is killed, sometimes due to a loss of power or a system crash, sometimes due to a third party helper application dying without cleaning up the lock files that exist, sometimes due to an impatient admin. When something of that nature happens, it will almost always leave some small corruption behind in the RPM SleepyCat db based database. Normally, the following will clear the problems.

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

This will remove the lockfiles (which start with that distinctive "__"), and fix the database damage left behind.

RPM not Locking| Cannot get shared lock on /var/lib/rpm/Packages

Something or someone else is using the rpmdb at the same time.

/sbin/fuser -v /var/lib/rpm/Packages
ps -aux | grep -i rpm

What RPM package supplies a specific file?

To find out what package supplies a given file, use:
rpm -qf /usr/X11R6/bin/ghostview

What causes the error "rpm error NOKEY"?

Make sure your keys are installed;
# rpm --import /usr/share/rhn/RPM-GPG-KEY
# rpm --import /usr/share/rhn/RPM-GPG-KEY-fedora
# rpm --import http://www.fedora.us/FEDORA-GPG-KEY

How do I find what dependencies a rpm file has?

  1. rpm -qpR {.rpm-file}
  2. rpm -qR {package-name}

RPM Related Web Links

DAG RPM Repository
RPM packages for Red Hat/Fedora
RPM.org Rpmfind.Net