RPM Ever Hang?
Sometimes, if an RPM operation is interrupted, the RPM database gets corrupted, and any subsequent RPM operation hangs the process. You can’t even ^C it. If you strace the process you’ll see the same system call getting invoked in an infinite loop.
How to fix?
[root@bob root]# cd /var/lib/rpm/
[root@bob rpm]# ls
Basenames __db.003 Installtid Provideversion Sha1header
Conflictname Dirnames Name Pubkeys Sigmd5
__db.001 Filemd5s Packages Requirename Triggername
__db.002 Group Providename Requireversion
[root@bob rpm]# \rm __db*
[root@bob rpm]# rpm --rebuilddb
Voila.