[plug] rpm and dependencies

Russell Keith-Magee keithmag at cs.curtin.edu.au
Fri Mar 2 07:03:25 WST 2001


Ari Finander wrote:
> 
> -->  The rpm database cannot be opened in db3 format. If you ahve just
> upgraded the rpm package you need to convert your database to db3
> format using "rpm --rebuilddb" as root.
> 
> When I ran the rpm --rebuilddb command as root I got this error:
> cannot get shared lock on /var/lib/rpm/Packages
> 
> When I tried a few minutes later, the rpm --rebuilddb command worked.
> I then tried the rpm -q --redhatprovides qt1x-GL command again and the
> errors came back as the last time I typed it (cannot open package...
> and -->  The rpm database...).  Any thoughts as to why this is
> happening, and/or a different method to find out where dependency
> files are?

This does rate as one of the most spectacularly useful error messages in
RedHat...

There are two possible reasons for the error message
1) You aren't logged in as root (or someone with write access to the
redhat database)
or, more likely
2) There's another program using the database. As long as gnorpm is
running, the RPM database will be locked. If you don't think anything
should be running with RPM open, use lsof to check if anything has
/var/lib/rpm/Packages open.

Unfortunately, there is no other way around it (AFAIK). You will get
similar problems trying to run rpm manually while doing a Ximian update,
or if you run two Ximian updates simultaneously. The RPM database seems
to be VERY non-atomic.

Russ %-)

-- 
-----------------------------------------------------------
Russell Keith-Magee
PhD Research Student
School of Computing, Curtin University of Technology
email: keithmag at cs.curtin.edu.au OR russ.magee at computer.org
WWW:   http://www.cs.curtin.edu.au/~keithmag
Ph: +61 8 9266 2129    FAX +61 8 9266 2819
-----------------------------------------------------------
When the going gets tough, the tough go grab a beer.



More information about the plug mailing list