LinuxQuestions.org
Help answer threads with 0 replies.
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 06-12-2012, 08:45 PM   #1
philleonard
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Rep: Reputation: Disabled
Yum update error (Python).


Hey guys, I recently did a large yum update. At first it did not update as some packages where broken and recommended that I --skip-broken which i did. Ever since, whenever I try and yum update, yum install, etc... I get the following error;
Code:
[root@localhost ppl]# yum update
Loaded plugins: langpacks, presto, refresh-packagekit
adobe-linux-i386                                                                                                                                                   |  951 B     00:00     
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 321, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 146, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 485, in doCommands
    return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
  File "/usr/share/yum-cli/yumcommands.py", line 405, in doCommand
    return base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
  File "/usr/share/yum-cli/cli.py", line 878, in updatePkgs
    self.update()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 4351, in update
    updates = self.up.getUpdatesTuples()
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1022, in <lambda>
    up = property(fget=lambda self: self._getUpdates(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 827, in _getUpdates
    self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1003, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 767, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 265, in populateSack
    self.doSetup()
  File "/usr/lib/python2.7/site-packages/yum/repos.py", line 92, in doSetup
    self.ayum.plugins.run('postreposetup')
  File "/usr/lib/python2.7/site-packages/yum/plugins.py", line 187, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/langpacks.py", line 72, in postreposetup_hook
    infile = repo.getGroups()
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1653, in getGroups
    if 'group_gz' in self.repoXML.fileTypes():
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1466, in <lambda>
    repoXML = property(fget=lambda self: self._getRepoXML(),
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1462, in _getRepoXML
    self._loadRepoXML(text=self)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1453, in _loadRepoXML
    return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1428, in _groupLoadRepoXML
    if self._commonLoadRepoXML(text):
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1243, in _commonLoadRepoXML
    result = self._getFileRepoXML(local, text)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1021, in _getFileRepoXML
    size=102400) # setting max size as 100K
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 843, in _getFile
    size=size
  File "/usr/lib/python2.7/site-packages/urlgrabber/mirror.py", line 409, in urlgrab
    return self._mirror_try(func, url, kw)
  File "/usr/lib/python2.7/site-packages/urlgrabber/mirror.py", line 395, in _mirror_try
    return func_ref( *(fullurl,), **kwargs )
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1017, in urlgrab
    return self._retry(opts, retryfunc, url, filename)
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 918, in _retry
    r = apply(func, (opts,) + args, {})
  File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1012, in retryfunc
    apply(cb_func, (obj, )+cb_args, cb_kwargs)
  File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 1505, in _checkRepoXML
    repoXML = repoMDObject.RepoMD(self.id, filepath)
  File "/usr/lib/python2.7/site-packages/yum/repoMDObject.py", line 124, in __init__
    self.parse(srcfile)
  File "/usr/lib/python2.7/site-packages/yum/repoMDObject.py", line 140, in parse
    parser = iterparse(infile)
  File "/usr/lib/python2.7/site-packages/yum/misc.py", line 1188, in cElementTree_iterparse
    return __cached_cElementTree.iterparse(filename)
  File "<string>", line 78, in __init__
RuntimeError: cannot load dispatch table from pyexpat
I have installed python 2.7.3 and then 2.6.8. Each time the errors still all seem to point to /usr/lib/python2.7/* files. (I wonder if it is something simple like changing an environment variable to point to the 2.6.8 python install?)

I have searched the internet for the past 2/3 hours to no avail.

I hope that someone can spot what's up! Thanks guys!
 
Old 06-14-2012, 04:32 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,272

Rep: Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662
Welcome to LQ.

Please specify Fedora / CentOS version.


The python installed by default cannot be changed in Fedora / CentOS ..
All administrative applications, including yum depends on this version.

( Any extra python version cannot appear as /usr/bin/python .
A naming like /usr/bin/python27 , /usr/bin/python26 is allowed.)

.
 
1 members found this post helpful.
Old 06-14-2012, 07:44 AM   #3
John VV
Guru
 
Registered: Aug 2005
Posts: 13,469

Rep: Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800
Quote:
I have installed python 2.7.3 and then 2.6.8. Each time the errors still all seem to point to /usr/lib/python2.7/* files. (I wonder if it is something simple like changing an environment variable to point to the 2.6.8 python install?)
not good
It might be easier and less time consuming to just do a fresh new install
but ??? it might not be too bad IF ONLY PYTHON is the issue

as "knudfl" stated THE VERSION OF python in the current fedora/cent/RHEL/SL and opensuse
MUST BE THE ONE used BY the system

that EXACT VERSION must be used !!!

so manually find the mirror for whatever operating system this is
and manually install THAT and ONLY that version of python in the CURRENT updates for the OS

example for ScientificLinux 6.2 ( i use that OS )
in sl6.2 there hav been none so it is the base install

ftp://linux1.fnal.gov/linux/scientif...4/os/Packages/
python-2.6.6-29.el6.i686.rpm


so i am guessing it is fedora for python 2.7
it is NOT fedora 17 that is using python3 and NOT 2 ( though python2.7 CAN be installed it is using 3 )
http://fedora.mirror.lstn.net/updates/16/i386/
python-2.7.3-3.fc16.i686.rpm

do a install using rpm and not yum
BUT rpm might also be busted
if so use "file-roller" to unzip the rpm( rpm's are a "type" of zip file)

and manually copy/paste the contents to there correct place
 
1 members found this post helpful.
Old 06-14-2012, 10:29 AM   #4
philleonard
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Thanks for the replies guys! I'm running Fedora 16 32-bit (3.3.2-6.fc16.i686). rpm still works so I tried downloading and installing the update;

Code:
[root@localhost ppl]# rpm -U python-2.7.3-3.fc16.i686.rpm
error: Failed dependencies:
	python-libs(x86-32) = 2.7.3-3.fc16 is needed by python-2.7.3-3.fc16.i686
[root@localhost ppl]# rpm -U --nodeps python-2.7.3-3.fc16.i686.rpm
	package python-2.7.3-3.fc16.i686 is already installed
[root@localhost ppl]# man rpm
[root@localhost ppl]# rpm -U -F --nodeps python-2.7.3-3.fc16.i686.rpm
However nothing has changed with yum
 
Old 06-14-2012, 10:40 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,272

Rep: Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662
Quote:
# rpm -U python-2.7.3-3.fc16.i686.rpm
The right command is : # rpm -Uvh --force python-2.7.3-3.fc16.i686.rpm

Option '--force' will replace all files in the package.
And install missing files.

.
 
1 members found this post helpful.
Old 06-14-2012, 10:50 AM   #6
philleonard
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Ah i see thanks I had to run it still with --nodeps:
Code:
rpm -Uvh --force --nodeps python-2.7.3-3.fc16.i686.rpm
It installed with no errors, but yum is still spitting out the same stuff.
 
Old 06-14-2012, 11:35 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,272

Rep: Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662Reputation: 2662
Quote:
I had to run it still with --nodeps
Please tell which dependencies it is missing.


Generally by yum problems : Install all related (python) packages manually:
# rpm -Uvh --force ...
yum-arch yum perl-YUM-RepoQuery PackageKit-yum yum-metadata-parser
python-iniparse python-sqlite python-urlgrabber rpm-python rpmlib

.
 
1 members found this post helpful.
Old 06-14-2012, 11:43 AM   #8
philleonard
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Code:
[root@localhost ppl]# rpm -Uvh --force python-2.7.3-3.fc16.i686.rpm
error: Failed dependencies:
	python-libs(x86-32) = 2.7.3-3.fc16 is needed by python-2.7.3-3.fc16.i686
[root@localhost ppl]#
So python-libs(x86-32) = 2.7.3-3.fc16 is needed by python-2.7.3-3.fc16.i686
 
Old 06-14-2012, 11:47 AM   #9
philleonard
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Going to try this rpm
ftp://fr2.rpmfind.net/linux/fedora/l....fc16.i686.rpm
 
Old 06-14-2012, 11:49 AM   #10
philleonard
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
Yesss!!!! That fixed it all Thanks loads for your help! Really appreciate it Is there a "thanks" button?
 
Old 06-14-2012, 07:51 PM   #11
John VV
Guru
 
Registered: Aug 2005
Posts: 13,469

Rep: Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800Reputation: 1800
the python MUST match has been a problem for many new users

but on the positive side - you will not fall into it again and you DID learn something new

now fedora is often way TOO new for many programs
if you find that you NEED python 2.6 or 2.5 ( or for the old and still NEEDED blender2.49 python 2.4)

they can be installed side by side
just DO some research on just HOW too do that
 
Old 06-15-2012, 06:29 AM   #12
philleonard
LQ Newbie
 
Registered: Jun 2012
Posts: 7

Original Poster
Rep: Reputation: Disabled
I sense a strong presence of condescension in the air.

A) I'm not a new Linux user.
B) That wasn't actually the problem was it?
C) I think you will find that if you even bothered to read the posts above (you even quoted me on it!) that I did install two versions of Python so my research is complete! woo!
D) I don't think anyone needs condescending with your FULL CAPS! I hope that you DID learn something today?

Have a good day Sir.
 
  


Reply


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 gives Fatal Python Error couldn't create autoTLSkey mapping rarebear.nm Linux - Newbie 7 01-14-2012 04:15 PM
yum / Python installation error dav0 Fedora 42 05-18-2011 02:49 PM
yum update results in python IndexError pattbert Fedora 6 06-24-2010 02:41 PM
Yum won't update Python Zeno McDohl Linux - Newbie 7 09-11-2008 04:04 PM
Yum on FC6. 'yum update' error. mufy Fedora 8 06-14-2007 03:03 AM


All times are GMT -5. The time now is 01:07 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration