Sean’s Obsessions

Sean Walberg’s blog

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?

1
2
3
4
5
6
7
8
[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.

Comments

I’m trying something new here. Talk to me on Twitter with the button above, please.