Maybe I'm the first to get this problem, but probably I won't be the last. I managed to get my RPM database into such a state that package managers wouldn't work - they'd just get stuck. Probably I killed a package manager process that seemed to be stuck but wasn't, and it left the database in a bad state. Google helped, though, here's what needs doing:
Code:
su -
rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb
yum clean all
[code]
This gets rid of the corrupted database files and rebuilds the rpm database. If yum complains about another process having lock on yum.pid, do an rm /var/run/yum.pid if you're sure you don't have another package manager running.
Edited for typo, thanks for pointing it out, tafelpoot