Red Hat Bugzilla – Bug 8752
rpm-3.0.4-0.33.i386.rpm --rebuilddb corrupts database
Last modified: 2008-05-01 11:37:54 EDT
I installed rpm-3.0.4-0.33.i386.rpm and ran rpm --rebuilddb, and
got the following messages:
c130441-j:lib!> rpm --rebuilddb
temporary database /var/lib/rpm already exists
error creating directory /var/lib/rpm: File exists
Instead of creating a temp dir and rebuilding the database, rpm
apparently added to the existing database in /var/lib/rpm, resulting
in duplicates of everything in the database. There may be a trivially
easy way to de-corrupt the database, but if so I don't know what
I backed off to rpm-3.0.4-0.31.i386.rpm and copied a good
/var/lib/rpm from another system, and the problem went away --
rpm --rebuilddb works fine again.
All of the rpms on the system exhibiting the problem were current
with the latest RawHide rpms as of Sat 2000/01/22 1200 PST.
Comment out the line in /usr/lib/rpm/macros that looks like
This will be fixed in rpm-3.0.4-0.34.
Now fixed in rpm-3.0.4-0.34 from Raw Hide.
Is there a way to fix a database that was corrupted by already? My database is
like 60 megs and has multiple copies of every package I've installed. I'd like
to keep my current database cause I've installed quite a few things since the
*** Bug 8993 has been marked as a duplicate of this bug. ***