-   Fedora (
-   -   Yum gets stuck (

linmix 12-22-2006 04:23 AM

Yum gets stuck
I'm having trouble with yum. No matter how I start it (cli, yumex, software updater) it just hangs.


sudo yum --disablerepo=livna update
Loading "installonlyn" plugin
Loading "fedorakmod" plugin
It doesn't respond to ctrl+c, closing the terminal, or "killall yum" as root, and if I try to start it again I get an error message about an existing lock that I'm unable to remove.

What can I do to get yum working again?

billymayday 12-22-2006 04:29 AM

I periodically have yum problems in FC5. I don't know what causes it, but killing with signal 9 works. That said, I don't know how to fix the problem except to wait

snecklifter 12-22-2006 04:34 AM

You could try:

sudo yum update --noplugins


sudo yum -d 10 update

the latter being the debugging level (which you can alter if you are getting too much garbage. You can then troubleshoot the problem or post back the last few lines where it hangs and I'll be happy to have a look.


linmix 12-22-2006 05:46 AM

First thing I did was try to kill it with -9 which worked perfectly.

Next thing, I diabled the plugins... and I got a bit further but got stuck again.

Then I tried

$ sudo yum -d 10 --disablerepo=livna update --noplugins
and got

Yum Version: 3.0.1
COMMAND: yum -d 10 --noplugins
Installroot: /
Setting up Update Process
Setting up repositories
Reading repository metadata in from local files
Setting up Package Sacks
Reading Local RPMDB
before it got stuck again.
So I thought I'd try

# rpm --rebuilddb
, but that has now got stuck as well.

What can I do next?

p.s. I'm unable to kill the rpm --rebuilddb command, even with killall -9 rpm

snecklifter 12-22-2006 05:48 AM

Have you tried:

sudo yum clean all

followed by

sudo yum update


linmix 12-22-2006 05:56 AM


Originally Posted by snecklifter
Have you tried:

sudo yum clean all

followed by

sudo yum update


I have (with the debug option enabled, and I get stuck in the same place:
Reading Local RPMDB

bfc 12-22-2006 05:58 AM

Here's what worked for me.

rm /var/lib/rpm/__db*

rpm --rebuilddb

yum clean all

snecklifter 12-22-2006 06:06 AM

Sounds like you have a corrupted rpm database thinking about it. I'd be inclined to trash it:

The page is old still quite relevant.


linmix 12-22-2006 08:16 AM


Originally Posted by bfc
Here's what worked for me.

rm /var/lib/rpm/__db*

rpm --rebuilddb

yum clean all

That's basically what's suggested on the page snecklifter referred to and it worked fine. The link also explained how the db may gave got corrupted: nice reading.

Just one last question. I ran yum with the -d 10 option and saw this run across the screen:

Building updates object
Traceback (most recent call last):
File "/usr/lib/python2.4/logging/", line 731, in emit
msg = self.format(record)
File "/usr/lib/python2.4/logging/", line 617, in format
return fmt.format(record)
File "/usr/lib/python2.4/logging/", line 405, in format
record.message = record.getMessage()
File "/usr/lib/python2.4/logging/", line 276, in getMessage
msg = msg % self.args
TypeError: not enough arguments for format string
It doesn't worry me, but it's strange anyway.

Thanks for all your help

inspiron_Droid 12-22-2006 09:31 AM

You could also try installing apt utilities as follows.
yum -y install apt

apt-get update

The Y tells yum to say yes to all questions.

linmix 12-22-2006 12:35 PM

And now for the next episode...

I used yumex to do a partial update (which went fine) and fired it up again a little later to install something. However, this time yumex never got past the initialization. I decided to wait patiently, but after 3 hours (3!!) I finally killed it. However if I now try to run yum I get a lock error:

Existing lock /var/run/ another copy is running. Aborting.
Both "killall -9 yum" and "killall -9 yumex turn up "no process killed", but I still have a lock and so no yum. (couldn't find a smily pulling out its hair)

snecklifter 12-22-2006 05:39 PM


sudo rm /var/run/

btw, I had all sorts of probs with yumex - FC6 and later have pirut and pup which are a bit better...

linmix 12-22-2006 06:15 PM

thanks, that did it.

I've had a look at both purit and Pup, and I can't say I'm impressed. At least as far as ease of use and available options are concerned.
Purit appears to only allow you to add or remove software, not update. Pup doesn't appear to allow me to select which source(s) I wan't to use to provide my updates

I wish yumex wouldn't give me such a pain.

snecklifter 12-22-2006 06:25 PM

You can edit the sources by editing each repository's .repo file under /etc/yum.repos.d/

Change enabled to 0 and then pup will reflect this. If you are regularly having to enable and disable repositories then you need to consolidate. Core, Extras + Livna are usually enough for most. If you need to use ATrpms then enable freshrpms at the same time but exclude Livna permanently - this usually works for me.


ZerXen 01-02-2007 03:26 PM

How Long it takes?
How long it takes to rebuild a rpm database ? just cca ?
Because I just ended Up with the same problem with yum stucked. I needed to SIGHUP him and deleted "__db.*" files to unlock access to him once more. On my next try I get stucked again. I have done the same thing as before to try to solve it with addition I deleted the whole YUM cache directory { with back-up ofcoarse } and a tryed to install package I desired once again .. and now it is almost 1hour 30min and yum takes still 98% CPU and ended up with
#yum install mplayer
~~output ommited~~
~~output ommited~~
Added 5985 new packages, deleted 0 old in 228.78 sek.
Resolving Dependencies
--> populating transaction ...
---> Downloading Header for mplayer
mplayer-1.0-0.28.pre8.fc5 |=============================| 29kB 00:02
---> package set to to be updated
--> Runnung Transaction test

{{ srr for this non copy paste reply but for a good reason I am unable to copy paste the terminal output. }}

and this I see for about an hour and a half ... what is happening? .. I am thinking that rpm database is corrupted but shoud I leave yum running for a while? or SIGHUP and start rebuilding rpm database?

All times are GMT -5. The time now is 10:27 AM.