common problem in yum

June 15, 2007

I’m at the linux-foundation summit right now and I’ve had a number of fruitful discussions with people who are able to point some specific issues with yum and frequently suggest many and varied ways to fix them. However, something I thought had been documented a bit but I wanted to mention was this:

If you find yum stalls out A LOT right after parsing arguments for various commands and/or that yum search takes a loooooooong time when you know it is not downloading from the network then you probably want to stop all yum and rpm-related processes and run as root:

rpm –rebuilddb

Then go to /var/lib/rpm and make sure __db* files are gone.

Run yum again and see if it makes things faster. I think it will.

Update: It’s been brought to my attention that others have documented this much better than I have:

http://people.redhat.com/berrange/notes/rpmrecovery.html

Go there to get the full story (even if it does say rhel3 at the top)

About these ads

3 Responses to “common problem in yum”

  1. Jens Knutson Says:

    Why is this? Does the rebuild optimize the DB or something?

  2. Scott Lamb Says:

    WTF?!? Why should I ever need to do that? These are lockfiles, yes? Why doesn’t yum/rpm/bdb use flock() on those files rather than presence so locks are automatically released if necessary?

  3. skvidal Says:

    Rebuilding the indexes seems to be the trick. I’m not sure why it gets out of sync, though.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: