yum crashes

Yes, yum is a nice tool. But when you deal with local repositories, and when you’re not the only root, you can end up with a broken yum.  This is the scary error message when you try to update:

yum update 
Loaded plugins: fastestmirror, langpacks, nvidia
Traceback (most recent call last):
 File "/usr/bin/yum", line 29, in <module>
 yummain.user_main(sys.argv[1:], exit_code=True)
 File "/usr/share/yum-cli/yummain.py", line 367, in user_main
 errcode = main(args)
 ...bla bla bla...
 File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", 
line 2366, in load host, speed, fail, ts = line.rsplit(' ', 3)
ValueError: need more than 3 values to unpack

And this is the solution:

systemctl stop yum-cron.service 
rm -f /var/lib/rpm/*db*
rpm --rebuilddb
yum update
yum --version
more /var/cache/yum/x86_64/7/timedhosts 
cp /var/cache/yum/x86_64/7/timedhosts timedhost.bkup

If this is not enough, try this:

rm /var/cache/yum/x86_64/7/timedhosts
 yum-config-manager --disable atrpms
 yum update

It could be that yum has a corrupted database. To rebuild it, try:

 #rpm --rebuilddb

I will post more crashes when I find them. I hope not to come back here too frequently 😉


About bitsanddragons

A traveller, an IT professional and a casual writer
This entry was posted in bits, linux, yum. Bookmark the permalink.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s