Red HatThis forum is for the discussion of Red Hat Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have the same problem, "run database recovery".
I deleted the __db files.
Then I ran the "rpm -qa", I saw a lot of application names scrolling by, but at the end there were some errors:
error: rpmdbNextIterator: skipping h# 933 Header V3 DSA signature: BAD, key ID db42a60e
rpmdb: page 949: illegal page type or format
rpmdb: PANIC: Invalid argument
rpmdb: /var/lib/rpm/Packages: pgin failed for page 949
error: db4 error(-30981) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery
error: db4 error(-30981) from dbcursor->c_close: DB_RUNRECOVERY: Fatal error, run database recovery
error: db4 error(-30981) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery
error: db4 error(-30981) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery
error: db4 error(-30981) from dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery
Running "rpm -qa" again gives me:
rpmdb: region error detected; run recovery.
error: db4 error(-30981) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30981)
error: cannot open Packages database in /var/lib/rpm
no packages
It takes less than one second, no error message at all.
The only thing that gives output is to use -vv, but still not working:
[root@mail root]# rpm -vv --rebuilddb
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.2285
D: creating directory /var/lib/rpmrebuilddb.2285
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages create:cdb:mpool
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening new database with dbapi 3
D: opening db environment /var/lib/rpmrebuilddb.2285/Packages create:mpool
D: opening db index /var/lib/rpmrebuilddb.2285/Packages create mode=0x42
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: removed db environment /var/lib/rpm/Packages
D: closed db index /var/lib/rpmrebuilddb.2285/Packages
D: closed db environment /var/lib/rpmrebuilddb.2285/Packages
D: removed db environment /var/lib/rpmrebuilddb.2285/Packages
D: removing directory /var/lib/rpmrebuilddb.2285
[root@mail root]#
It recreates the __db files, but they seems to be empty, "rpm -qa" gives nothing at all. So they need to be "populated" with info about my installed programs....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.