Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-03-2010, 11:11 PM   #1
LQ Newbie
Registered: May 2010
Location: Malaysia
Distribution: RedHat EL5 and Ubuntu
Posts: 8

Rep: Reputation: 0
yum error when update/download package


I have errors when doing yum update and yum install "package". Im using redhat el5 and i386 arch. The errors:

Traceback (most recent call last):
File "/usr/bin/yum", line 29, in ?
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/", line 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/", line 261, in main
return_code = base.doTransaction()
File "/usr/share/yum-cli/", line 398, in doTransaction
problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb)
File "/usr/lib/python2.4/site-packages/yum/", line 1295, in downloadPkgs
remote_size += po.size
TypeError: unsupported operand type(s) for +=: 'int' and 'str'
My yum.conf:


# This is the default, if you make this bigger yum won't see if the metadata
# is newer on the remote and so you'll "gain" the bandwidth of not having to
# download the new metadata and "pay" for it by yum not having correct
# information.
# It is esp. important, to have correct metadata, for distributions like
# Fedora which don't keep old packages around. If you don't like this checking
# interupting your command line usage, it's much better to have something
# manually check the metadata once an hour (yum-updatesd will do this).
# metadata_expire=90m

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d
and my yum.repos.d

-rw-r--r-- 1 root root 1333 Dec 14 07:32 atomic.repo
-rw-r--r-- 1 root root 2245 Oct 1 2009 CentOS-Base.repo
-rw-r--r-- 1 root root 626 Oct 1 2009 CentOS-Media.repo
-rw-r--r-- 1 root root 0 Jun 4 18:07 centos.repo
-rw-r--r-- 1 root root 1525 Jun 3 23:22 mirrors-rpmforge
-rw-r--r-- 1 root root 250 Apr 15 20:34 plesk.repo
-rw-r--r-- 1 root root 428 Mar 9 2007 rpmforge.repo
Appreciate any help as i need to install a package. Thanks in advance.
Old 06-04-2010, 01:45 AM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Hi -

Try this:

Fixed my issue

Noticed two yum-metadata-parser rpms
deleted older one

new error
deleted 2nd said not installed


tried to install
said installed
used --force
it installed

yum worked
'Hope that helps .. PSM

See also this Redhat bug:

I'd try the above, first.

At that point, you should be able to do a "yum update".

Afterwards, you should be home free.

Last edited by paulsm4; 06-04-2010 at 01:47 AM.
Old 06-04-2010, 03:18 AM   #3
LQ Newbie
Registered: May 2010
Location: Malaysia
Distribution: RedHat EL5 and Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
For the first solution, i dont have duplication of yum-metadata-parser:

[root@localhost /]# yum --version
Installed: rpm-4.4.2-37.el5.i386 at 2010-01-04 11:02
Built : Red Hat, Inc. <> at 2007-01-04 16:28
Committed: Paul Nasrat <> at 2007-01-04 22:00

Installed: yum-3.2.22-4.el5.noarch at 2010-06-01 11:40
Built : ATrpms <> at 2009-04-16 10:02
Committed: James Antill <james at> at 2009-04-09 10:00

Installed: yum-metadata-parser-1.1.2-2.el5.i386 at 2010-05-19 15:52
Built : [] at 2008-05-28 15:27
Committed: James Antill <> at 2008-01-18 22:00
and the second solution, im guessing its not related to my error..i didnt even have package-cleanup:

[root@localhost /]# /usr/bin/package-cleanup --problems
-bash: /usr/bin/package-cleanup: No such file or directory
plus i dont know what to do with the file.

Really need some direct solution to my problem..anyway thanks paulsm4
Old 06-04-2010, 03:42 AM   #4
Registered: Aug 2006
Posts: 609

Rep: Reputation: 79
What mostly fixes the issue is doing:
yum clean all

This problems with yum have been known for the past 10 years probably (only a little exaggeration).
Old 06-04-2010, 03:50 AM   #5
LQ Newbie
Registered: May 2010
Location: Malaysia
Distribution: RedHat EL5 and Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks..but i've already try "yum clean all" before "yum update"..
Old 06-04-2010, 04:50 AM   #6
Registered: Apr 2010
Location: Johannesburg
Distribution: Fedora 14, RHEL 5.5, CentOS 5.5, Ubuntu 10.04
Posts: 559

Rep: Reputation: 92

check out this bug report:

Similar kind of issue that has a suggested solution.
Old 06-08-2010, 12:29 AM   #7
LQ Newbie
Registered: May 2010
Location: Malaysia
Distribution: RedHat EL5 and Ubuntu
Posts: 8

Original Poster
Rep: Reputation: 0
Still have no luck.. i think it might not because of tmprepo. I coudn't find the plugin tmprepo for my 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
Yum update is deleting package wimnat Linux - General 2 10-17-2009 04:17 AM
Yum and skipping a package update i_nomad Linux - Server 1 03-03-2009 11:36 AM
yum - error on package download emuub Linux - Software 5 06-26-2007 03:21 AM
YUM Update All But Specific Package jmoschetti45 Linux - Software 1 05-20-2007 05:32 AM
Yum Error: Transaction Check Error package x(which is newer than package y)... godsk Linux - Newbie 0 06-05-2006 08:13 AM > Forums > Linux Forums > Linux - Newbie

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

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