3

I want to install the following rpm, but for some reason RPM is stuck or frozen and will not install the RPM package. I can't stop it by control-C.

Please advise what could be the problem?

 root]# rpm -Uvh --repackage /var/tmp/bash-2.05b-41.8.i386.rpm

..... no output here

OR

 root]# rpm -Uvh  /var/tmp/bash-2.05b-41.8.i386.rpm

RPM verification ( the last lines )

  rpm -Uvvh /var/tmp/bash-2.05b-41.8.i386.rpm
  .
  .
  .

  D: installing binary packages
  D: closed   db index       /var/lib/rpm/Pubkeys
  D: closed   db index       /var/lib/rpm/Conflictname
  D: closed   db index       /var/lib/rpm/Providename
  D: closed   db index       /var/lib/rpm/Requirename
  D: closed   db index       /var/lib/rpm/Packages
  D: closed   db environment /var/lib/rpm/Packages
  D: opening  db environment /var/lib/rpm/Packages joinenv
  D: opening  db index       /var/lib/rpm/Packages create mode=0x42
  D: mounted filesystems:
  D:     i    dev bsize       bavail       iavail mount point
5
  • Which distribution and version?
    – Cyrus
    Commented Oct 22, 2014 at 14:14
  • on Linux red-hat 3 , its not work on any RPM , Commented Oct 22, 2014 at 14:21
  • From where do you got this RPM für RHEL3?
    – Cyrus
    Commented Oct 22, 2014 at 15:26
  • Are other commands (like 'ls') working fine?
    – Sreeraj
    Commented Oct 23, 2014 at 19:19
  • I am shell shocked!
    – Ura
    Commented Oct 23, 2014 at 22:59

2 Answers 2

5

rpm may be waiting for a lock to be freed.

First, run ps -ef | grep rpm to see if you have any RPM commands running. If you do, kill them using kill -9.

Next, delete any leftover locks rm -rf /var/lib/rpm/__db.0*

Then try your rpm command again. If it still doesn't work, repeat as above, but then also run rpm --rebuilddb before trying your install again.

Edit:

If this hasn't solved the problem, you may have a non-responsive filesystem. Does df also hang? If it does, that's probably your problem. cat /etc/mtab and find out what filesystem is mounted on the next line after the last output from df then try to unmount that filesystem.

4
  • I do all you write , and still isnt work - RPM is hang/freeze/stuck Commented Oct 22, 2014 at 15:15
  • Is there any output if you run rpm -Uvvh /var/tmp/bash-2.05b-41.8.i386.rpm? The extra v should cause it to be more verbose. If there's any output, please paste it into your question. Commented Oct 22, 2014 at 15:21
  • please look on the update quastion Commented Oct 22, 2014 at 15:31
  • I added a suggestion as an edit in my answer. Have you tried it? Commented Oct 22, 2014 at 18:31
1

You likely have a stale lock.

A reboot would remove a stale lock (and a stale futex), so would "rm -f /var/lib/rpm/__db*" or "cd /var/lib/rpm && db_recover -ev".

If still hanging, use -Uvv instead of -Uvh to find out operation rpm is trying to perform.


From the -Uvv output, rpm is finding the size of mounted file systems.

You likely have an NFS mount to a server that isn't responding

1
  • I had an unusable NFS mount. Thanks for your tip. Commented Nov 24, 2016 at 7:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .