Re: [suse-sles-e] sles8 corrupt rpm database, how to fix

From: \ (mej_at_mindspring.com)
Date: Wed Feb 28 2007 - 18:02:09 CET


Message-ID: <21588120.1172682130092.JavaMail.root@mswamui-billy.atl.sa.earthlink.net>
Date: Wed, 28 Feb 2007 11:02:09 -0600 (GMT-06:00)
From: "\"Michael E. Jaggers\" <mej@mindspring.com>" <mej@mindspring.com>
Subject: Re: [suse-sles-e] sles8 corrupt rpm database, how to fix


>From: "M.R. Muthukumar" <m_muthukumar@yahoo.com>
>Sent: Feb 28, 2007 9:29 AM
>To: suse-sles-e@suse.com
>Subject: [suse-sles-e] sles8 corrupt rpm database, how to fix
>
>Folks,
>
>We have a corrupt rpm database in one of our sles8
>server. rpm -qa hangs after listing few packages.
>rpm --rebuilddb hangs forever.
>
>I looked at /var/lib/rpm all files except packages.rpm
>says they are Berkeley DB 1.85 (Hash, version 2,
>native byte-order) where as packages.rpm says its
>data.
>
>Is there a tool to fix this, any/all help is greatly
>appreciated.
>
>-Muthu

I have had this happen to me on one of my Mandriva test systems when I was using the "Cooker" builds. It's a relatively painless fix, but not for the faint of heart. The db files are hiddel, so you need to su in a terminal window.

From Mandriva's wiki at http://wiki.mandriva.com/en/Tools/urpmi:

Rebuild your database

If the database becomes inconsistent (an inconsistency can lead rpm to tell you that a "package is already installed" when it is actually not, and vice-versa).

rm -rf /var/lib/rpm/__db*
rpm --rebuilddb

* It is a good idea to regularly back up your /var/lib/rpm directory. Then you can always revert to a previously good database and reinstall the packages that came later with:

rpm -ivh --justdb --noscripts --notriggers

That should do it.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: suse-sles-e-unsubscribe@suse.com
For additional commands, e-mail: suse-sles-e-help@suse.com



This archive was generated by hypermail 2.1.7 : Wed Feb 28 2007 - 20:06:11 CET