PDA

View Full Version : [SOLVED] unable to log in - corrupt rpmdb


andrewthomas
26th January 2011, 01:36 PM
For a couple of days I was unable to log in either in gdm or in the console.

I just kept updating in a chroot, hoping for the best.

Finally I decided to relabel the file system with

# touch .autorelabel

in the root directory.

This enabled me to finally log in, yet when I tried to update I got an error similar to:

error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

When I tried:

rpm –rebuilddb

I got another error.

Finally I was able to fix it with

# db47_recover -e

andrewthomas
14th February 2011, 05:49 PM
EDIT: I encountered this again and was unable to recover using the above command and had to

rm /var/lib/rpm/__* && rpm --rebuilddb