LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   yum error when update/download package (https://www.linuxquestions.org/questions/linux-newbie-8/yum-error-when-update-download-package-812058/)

mosen81 06-03-2010 10:11 PM

yum error when update/download package
 
Hi,

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

Quote:

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/yummain.py", line 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 261, in main
return_code = base.doTransaction()
File "/usr/share/yum-cli/cli.py", line 398, in doTransaction
problems = self.downloadPkgs(downloadpkgs, callback_total=self.download_callback_total_cb)
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 1295, in downloadPkgs
remote_size += po.size
TypeError: unsupported operand type(s) for +=: 'int' and 'str'
My yum.conf:

Quote:

[main]
cachedir=/var/cache/yum
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3

# 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

Quote:

-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.

paulsm4 06-04-2010 12:45 AM

Hi -

Try this:
Quote:

https://www.centos.org/modules/newbb...topic_id=19656

Fixed my issue

Noticed two yum-metadata-parser rpms
deleted older one

new error
deleted 2nd said not installed

downloaded
yum-metadata-parser-1.1.2-2.el5.i386

tried to install
said installed
used --force
it installed

yum worked
'Hope that helps .. PSM

PS:
See also this Redhat bug:
https://bugzilla.redhat.com/show_bug.cgi?id=539580

I'd try the above, first.

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

Afterwards, you should be home free.

mosen81 06-04-2010 02:18 AM

For the first solution, i dont have duplication of yum-metadata-parser:

[root@localhost /]# yum --version
Quote:

3.2.22
Installed: rpm-4.4.2-37.el5.i386 at 2010-01-04 11:02
Built : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla> at 2007-01-04 16:28
Committed: Paul Nasrat <pnasrat@redhat.com> at 2007-01-04 22:00

Installed: yum-3.2.22-4.el5.noarch at 2010-06-01 11:40
Built : ATrpms <http://ATrpms.net/> at 2009-04-16 10:02
Committed: James Antill <james at fedoraproject.org> 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 <james.antill@redhat.com> at 2008-01-18 22:00
and the second solution, im guessing its not related to my error..i didnt even have package-cleanup:

Quote:

[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 miscutils.py file.

Really need some direct solution to my problem..anyway thanks paulsm4

deadeyes 06-04-2010 02:42 AM

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).

mosen81 06-04-2010 02:50 AM

Thanks..but i've already try "yum clean all" before "yum update"..

alli_yas 06-04-2010 03:50 AM

mosen

check out this bug report: https://bugzilla.redhat.com/show_bug.cgi?id=501723

Similar kind of issue that has a suggested solution.

mosen81 06-07-2010 11:29 PM

Still have no luck.. i think it might not because of tmprepo. I coudn't find the plugin tmprepo for my yum. :(


All times are GMT -5. The time now is 04:39 PM.