[SWLUG] RPM Problems

Bryn Reeves hagbard at nildram.co.uk
Tue Oct 14 12:48:22 UTC 2003


On 13:32 Tue 14 Oct     , Telsa Gwynne wrote:
> 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
> 
> 
> 
> _______________________________________________
> SWLUG Discussion List - Discuss at swlug.org.uk
> http://list.swlug.org.uk/mailman/listinfo/discuss

You might want to try fuser too - it'll tell you which PIDs are using 
a particular file and what sort of access they have, e.g:

[breeves at BR_LINUX breeves]$ /sbin/fuser -v /mnt/cdrom/

                USER        PID ACCESS COMMAND
/mnt/cdrom/     breeves    9077 ..c..  bash
                root     kernel mount  /mnt/cdrom

Means that root's using it as a mount point and an instance of bash
has it as it's current directory (the ..c..)

Cheers

Bryn
				





More information about the Swlug mailing list