Re: Restore RPM database?

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Craig White
Date:  
To: plug-discuss
Subject: Re: Restore RPM database?
On Sun, 2005-02-06 at 12:02 -0700, Craig White wrote:
> On Sun, 2005-02-06 at 09:09 -0700, Alan Dayley wrote:
>
> > It's not happy since I seem to have the same results as before.
> >
> ---
> as a means of a bookmark - this may be of use to you but I think this is
> more to the point of - if normal methods of rebuilddb aren't going to
> work, this probably has the sort of info that you/we need...
>
> <http://www.redhat.com/archives/rpm-list/2002-March/msg00072.html>
>

----
One more step thru on this...probably a little more succinct...


Fix a hoarked rpm database

    Symptom: All rpm commands "hang up"

    
    Find and kill all processes running rpm or up2date:


        ps ax | grep rpm
        ps ax | grep up2date

        
        (Kill them by hand)


    Remove all rpm database lock files:


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


    This usually gets things going. If not:

    
    First make a backup of the database:


        cp -r /var/lib/rpm /var/lib/rpm.copy


    Then rebuild the database


        rpm --rebuilddb


    This takes some time, but if it hangs forever, repeat
    the "Find and kill rpm" step and proceed with:

    
        cd /var/lib/rpm
        db_verify Packages


        (You may need to install db4-utils)

    
    If db_verify reports errors, try:


        cp Packages Packages.backup
        db_dump Packages.backup | db_load Packages
        rpm --rebuilddb

        
    If all these steps fail, you are in big do-do. 


---------------------------------------------------
PLUG-discuss mailing list -
To subscribe, unsubscribe, or to change you mail settings:
http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss