[SWLUG] RPM Problems

Telsa Gwynne hobbit at aloss.ukuu.org.uk
Tue Oct 14 12:32:48 UTC 2003


On Tue, Oct 14, 2003 at 11:27:32AM +0100 or thereabouts, Dylan Davies wrote:
> Every time i try rpm -i i get this :
> 
> rpmdb: unable to join the environment
> error: db4 error(11) from dbenv->open: Resource temporarily unavailable
> error: cannot open Packages index using db3 - Resource temporarily
> unavailable (11)
> error: cannot open Packages database in /var/lib/rpm
> Please help

Some silly questions: 

(a) is this as root?
(b) what version of rpm is this? (or what distro: I appreciate
that rpm --version may also not want to work atm).
(c) is there a stuck rpm process on 'top' or in 'ps aux'?

I have had rpm refuse to work in one terminal when an earlier
rpm command in another terminal is still chugging away. Some
big rpmbuild --something -I --forget, but it took a while.
In the meantime, I couldn't get quick rpm -q queries to run
The rpmdb was still being held open, or locked, or some other 
technical term meaning "I've got it, and you can't have a look".

So I would look to see whether any other program is holding
/var/lib/rpm/whatever open. There is an 'lsof' command which
lists open files. I can never remember the way to get sensible
output from it, but that is probably the command you need to
find out what thinks it has it open.

Actually, no. First I would check that the file it's looking
for exists and is intact. "file /var/lib/rpm/Packages" tells me
  $ file /var/lib/rpm/Packages
  /var/lib/rpm/Packages: Berkeley DB (Hash, version 7, native byte-order)
here.

But if it's there, it's possible some other program has it
open? 

Shots in the dark, these (as if you hadn't guessed).

Telsa






More information about the Swlug mailing list