Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
Reply to this topicStart new topic
> Rh 8.0 - Rpm Installs Stopped Working, RPM manager went bad.
post Mar 19 2003, 03:41 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 19-March 03
Member No.: 570


Yesterday while I was updating my system the RPM manager went ded.
I can not check my Packages status (add, remove, update). The RPM manager starts then disappear. If I try to install any rpm file it also fail. Starts but then disappear.

I am since yesterday luch time trying to make this work. Could you please help?

I have RH 8.0 and the latest updates until yesterday morning.

I tried to search for a solution but I could not find one.
Bellow is the latest thing I have tried. It seems to be a similar problem, but is not solving mine.

I can rebuild the database but the RPM manager (Packages under RH8.0) still does not work. Nor I can install file just clicking over and RPM file as I was able to do yesterday morning.

THANK you in advance.


Q. I can't upgrade any packages, run up2date or rpm. What is wrong?

A. The RPM database sometimes gets stuck. One cause of this problem is when a process working on the RPM database is killed, which leaves lock files in place, limiting what further processes can do to the database. So, a word to the wise: make sure such a process really is stuck before killing it - if a process is using much CPU time (eg. as reported by top) it is probably still doing useful work.

A tip o' the hat to: M A Young <> for this summarization.

This has to be repaired manually for rpm to eliminate what are described at 'hangs', and to permit rpm to properly function.

What the nature of the underlying problem is, and how to fix it, are detailed below:

First informally: When a process _is_ so killed [sometimes due to a loss of power crash, sometimes due to a third party helper application dying without cleaning up the lock files at exist, sometimes due to an impatient admin], it will almost always leave some small corruption behind in the RPM 'SleepyCat' db based database. Usually the simple
rm -f /var/lib/rpm/__db*
rpm -vv --rebuilddb
will remove the lockfiles (which start with that distinctive "__"), and fix the database damage left behind. [Note: we have added the option -vv here, so that there is visible progress and lots of detail during the rebuild process -- A worried admin is often impatient at a lack of visible progress -- this option causes the rebuild process to be quite verbose.]

But, unfortunately, sometimes more substantive database repair is needed, as described below the section with Jeff Johnson's email later in this discussion.

Think of a two way linked list (we ignore indices to simplify the presentation) for RPM Package description items thus:
-> -> -> ->
<- <- <- <-
If we have just a couple of broken links, we do not have any 'orphan chains' and rpm --rebuilddb can repair things:
-> -> ->
<- <- <-
But if substantial persistent corruption occurs, and is not repaired for a long time, we might get:
-> ->
<- <-
And it becomes unclear where to re-attach A and B, to the other chain. (Note: This is an analogy, and does not precisely describe the data structures, rebuild or dump processes from a formal standpoint.)

What else might cause the problem? Warren Togami has reviewd the trouble ticket trackers for the Conectiva apt for rpm package, and others (the Ximian updater, Gerald Teschl's autoupdate), and helped locate some interaction issues which are being worked on and discussed on the RH rpm-list.

More formally: see the Bugzilla master ticket on this issue, 73097

Separately, a testing release (issued 7 Oct 2002) for an updated RPM is available at Jeff Johnson's personal ftp site -- Warning: This is NOT a formal Red Hat QA approved release.

Date: Thu, 8 Aug 2002 09:10:12 -0400
From: Jeff Johnson <>
Subject: Re: rpm database - how to repair it?

On Thu, Aug 08, 2002 at 01:37:52PM +0200, Robert Vojta wrote:
> What is the safest way how to repair rpm database
> (if it's corrupted)? I was doing this job a long time
> ago and I forgot the whole process sad.gif

Hmmm, "hangs" in select are usually stale locks. Fix by doing

rm -f /var/lib/rpm/__db*

All that needs repairing is /var/lib/rpm/Packages, the indices can/will be rebuilt with rpm --rebuilddb later.

Save a copy just in case:

cd /var/lib
tar czvf /tmp/rpmdb.tar.gz rpm
Verify integrity with

cd /var/lib/rpm
db_verify Packages
If there are any errors, repair by doing

mv Packages Packages-ORIG
db_dump Packages-ORIG | db_load Packages
Read all the headers in Packages by doing

rpm -qa
If you segfault here, make an entry at and I'll tell you what to do.

Rebuild the indices

rpm --rebuilddb

73 de Jeff

Jeff Johnson ARS N3NPQ (
Chapel Hill, NC
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 23rd June 2018 - 03:22 AM