Thursday, June 11, 2009

rpmdb: PANIC: fatal region error detected

I had the following error when trying any yum operation on Fedora 11:

> yum update
Loaded plugins: refresh-packagekit
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30974) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
File "/usr/bin/yum", line 29, in
yummain.user_main(sys.argv[1:], exit_code=True)
[...]

The googled ;-) solution that worked for me was:

> cd /var/lib/rpm
> rm -f __db.00*
> db_verify Packages
> rpm --rebuilddb

No comments: