LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 12-22-2006, 04:23 AM   #1
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Yum gets stuck


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

e.g.
Quote:
sudo yum --disablerepo=livna update
Password:
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?
 
Old 12-22-2006, 04:29 AM   #2
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
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
 
Old 12-22-2006, 04:34 AM   #3
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

Rep: Reputation: 30
You could try:

sudo yum update --noplugins

or

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.

Regards
Chris
 
Old 12-22-2006, 05:46 AM   #4
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
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
Quote:
$ sudo yum -d 10 --disablerepo=livna update --noplugins
and got
Quote:
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
Quote:
# 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

Last edited by linmix; 12-22-2006 at 05:48 AM.
 
Old 12-22-2006, 05:48 AM   #5
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

Rep: Reputation: 30
Have you tried:

sudo yum clean all

followed by

sudo yum update

?
 
Old 12-22-2006, 05:56 AM   #6
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
Quote:
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
 
Old 12-22-2006, 05:58 AM   #7
bfc
LQ Newbie
 
Registered: May 2006
Distribution: Fedora FC6
Posts: 17

Rep: Reputation: 0
Here's what worked for me.

rm /var/lib/rpm/__db*

rpm --rebuilddb

yum clean all

Last edited by bfc; 12-22-2006 at 05:59 AM.
 
Old 12-22-2006, 06:06 AM   #8
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

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

http://www.rpm.org/hintskinks/repairdb/

The page is old still quite relevant.

Regards
Chris
 
Old 12-22-2006, 08:16 AM   #9
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
Quote:
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:
Quote:
Building updates object
Traceback (most recent call last):
File "/usr/lib/python2.4/logging/__init__.py", line 731, in emit
msg = self.format(record)
File "/usr/lib/python2.4/logging/__init__.py", line 617, in format
return fmt.format(record)
File "/usr/lib/python2.4/logging/__init__.py", line 405, in format
record.message = record.getMessage()
File "/usr/lib/python2.4/logging/__init__.py", 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
 
Old 12-22-2006, 09:31 AM   #10
inspiron_Droid
Member
 
Registered: Dec 2006
Distribution: Debian (Wheeze)
Posts: 391

Rep: Reputation: Disabled
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.
 
Old 12-22-2006, 12:35 PM   #11
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
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:
Quote:
Existing lock /var/run/yum.pid: 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)
 
Old 12-22-2006, 05:39 PM   #12
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

Rep: Reputation: 30
easy.

sudo rm /var/run/yum.pid

btw, I had all sorts of probs with yumex - FC6 and later have pirut and pup which are a bit better...
 
Old 12-22-2006, 06:15 PM   #13
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
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.
 
Old 12-22-2006, 06:25 PM   #14
snecklifter
Member
 
Registered: Mar 2004
Location: UK/West Yorkshire/Huddersfield
Distribution: Fedora 7
Posts: 982

Rep: Reputation: 30
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.

Regards
Chris
 
Old 01-02-2007, 03:26 PM   #15
ZerXen
LQ Newbie
 
Registered: Jan 2007
Location: Slovakia
Distribution: Fedora Core 5,6 ; Slackware 10.1
Posts: 2

Rep: Reputation: 0
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?
 
  


Reply

Tags
fedora, hanging, yum


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem after yum yum yum (delicious) alaios Fedora 3 01-14-2009 03:34 AM
Yum Problem - /var/cache/yum/base/primary.xml.gz:1 ice99 Linux - Software 0 12-15-2005 02:08 PM
Query re: order of yum update and yum install jajtiii Linux - General 0 12-12-2005 01:48 PM
yum version yum-2.0.5-0.9.2.legacy.noarch.rpm master Red Hat 6 05-13-2005 04:03 PM
Yum Errors in parsing, whats wrong here (yum.conf pasted) thejokker Linux - Newbie 1 06-15-2004 03:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 12:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration