rpm issues with /var/lib/rpm/Packages

Posted on

My /var/lib/rpm/Packages got corrupted.

I have tried to follow this tutorial to fix it.

https://access.redhat.com/solutions/6903

It acts like it works but when I try to install a package I am not able to.

root@server1 /var/lib/rpm:>rm -f __db*
root@server1 /var/lib/rpm:>rpm -vv --rebuilddb
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.59659
D: opening db environment /var/lib/rpm private:0x401
D: opening db index /var/lib/rpm/Packages 0x400 mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening db environment /var/lib/rpmrebuilddb.59659 private:0x401
D: opening db index /var/lib/rpmrebuilddb.59659/Packages (none) mode=0x42
D: opening db index /var/lib/rpmrebuilddb.59659/Packages 0x1 mode=0x42
D: disabling fsync on database
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm
D: closed db index /var/lib/rpmrebuilddb.59659/Packages
D: closed db environment /var/lib/rpmrebuilddb.59659
root@server1 /var/lib/rpm:>yum install man
CRITICAL:yum.main:

Error: rpmdb failed release provides. Try: rpm --rebuilddb