Any idea why this would die ?
rpm -q works, anything else fails like this.
[me@host ~]$ sudo rpm --rebuilddb
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30978) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index
[me@host ~]$ rpm -v
RPM version 4.3.1
[me@host ~]$ rpm -q db4 db4-4.2.52-3.1
Try with verbose :
$ sudo rpm --rebuilddb -vv
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.22094
D: creating directory /var/lib/rpmrebuilddb.22094
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages joinenv
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30978) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
error: cannot open Packages index
D: removing directory /var/lib/rpmrebuilddb.22094