Bug 11361 - rpm can't read database after upgrade
rpm can't read database after upgrade
Status: CLOSED DUPLICATE of bug 10775
Product: Red Hat Raw Hide
Classification: Retired
Component: rpm (Show other bugs)
1.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-05-11 05:53 EDT by Jonathan Kamens
Modified: 2008-05-01 11:37 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2000-05-11 08:06:01 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jonathan Kamens 2000-05-11 05:53:21 EDT
I had rpm-3.0.4-0.48 and rpm-build-3.0.4-0.48 installed.  I "upgraded" to
rpm-3.1-0.9 and rpm-build-3.1-0.9.  When I attempted to view the database,
rpm claimed that it couldn't see several files that are in fact present in
/var/lib/rpm and then it segfaulted.
Comment 1 SB 2000-05-11 07:37:59 EDT
I had the same exact problem, and so have other people.  That version of rpm
appears to use a different rpmdb (db x.x) version than previous  version and
lacks support for the older db formats including db 2.x version 5.  I have been
unable in trying to get it to work properly and the only workaround I can see is
to reinstall an older version of RPM.  If you are unable to use rpm completely
and have no backup of the rpm binary you can do the following:

1) download or obtain a copy of rpm (version 3.1-0.3 or 3.04-7) and save it to /
tmp
2) convert the rpm to a cpio archive by doing this:  rpm2cpio rpm-3.1-
0.3.i386.rpm > rpm-3.1-0.3.i386.rpm.cpio
3) extract the the files from the archive by doing this: cpio -i --make-
directories --preserve-modification-time --file=rpm-3.1-0.3.i386.rpm.cpio
that will create the directories where the package's file are created.
4) By hand move the file from the /tmp/usr directories to the /usr directory
equivilants and do the same with /tmp/bin/rpm which should be moved to /bin/rpm.
5) After those steps are complete and you moved all the files to the proper place
your rpm should be working again.

As of right now I'm not aware of any way to convert the rpmdb's prior to 2.1-0.x
to the new format used in rpm-3.1-0.9 so reinstalling that package in to see if
it does it again will be a fruitless attempt as it will fail again. Just thought
I'd warn you.

Hope that helped,

Stan Bubrouski
Comment 2 Jeff Johnson 2000-05-11 08:06:59 EDT
*** This bug has been marked as a duplicate of 10775 ***

Note You need to log in before you can comment on or make changes to this bug.