当前位置: 技术问答>linux和unix
Yum报错
来源: 互联网 发布时间:2017-03-23
本文导语: Yum报错,网上很多说要安装python-elementtree,但已经安装 [root@lujinhong software]# rpm -qa | grep python-ele python-elementtree-1.2.6-7.el4.rf.x86_64 大家帮忙看看怎么处理?? [root@lujinhong software]# yum list Local ...
Yum报错,网上很多说要安装python-elementtree,但已经安装
[root@lujinhong software]# rpm -qa | grep python-ele
python-elementtree-1.2.6-7.el4.rf.x86_64
大家帮忙看看怎么处理??
[root@lujinhong software]# yum list
Local | 1.3 kB 00:00 ...
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 285, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 136, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 434, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 897, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 682, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 294, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1256, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1455, in
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1447, in _getRepoXML
self._loadRepoXML(text=self)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1437, in _loadRepoXML
return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1412, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1230, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1008, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 830, in _getFile
size=size
File "/usr/lib/python2.6/site-packages/urlgrabber/mirror.py", line 408, in urlgrab
return self._mirror_try(func, url, kw)
File "/usr/lib/python2.6/site-packages/urlgrabber/mirror.py", line 394, in _mirror_try
return func_ref( *(fullurl,), **kwargs )
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 985, in urlgrab
return self._retry(opts, retryfunc, url, filename)
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 886, in _retry
r = apply(func, (opts,) + args, {})
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 980, in retryfunc
apply(cb_func, (obj, )+cb_args, cb_kwargs)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1494, in _checkRepoXML
repoXML = repoMDObject.RepoMD(self.id, filepath)
File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 124, in __init__
self.parse(srcfile)
File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 140, in parse
parser = iterparse(infile)
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1169, in cElementTree_iterparse
_cElementTree_import()
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1164, in _cElementTree_import
import cElementTree
ImportError: No module named cElementTree
[root@lujinhong software]# rpm -qa | grep python-ele
python-elementtree-1.2.6-7.el4.rf.x86_64
大家帮忙看看怎么处理??
[root@lujinhong software]# yum list
Local | 1.3 kB 00:00 ...
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 285, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 136, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 434, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 99, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.6/site-packages/yum/depsolve.py", line 110, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 897, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 682, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.6/site-packages/yum/repos.py", line 294, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 165, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 223, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1256, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1455, in
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1447, in _getRepoXML
self._loadRepoXML(text=self)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1437, in _loadRepoXML
return self._groupLoadRepoXML(text, self._mdpolicy2mdtypes())
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1412, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1230, in _commonLoadRepoXML
result = self._getFileRepoXML(local, text)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1008, in _getFileRepoXML
size=102400) # setting max size as 100K
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 830, in _getFile
size=size
File "/usr/lib/python2.6/site-packages/urlgrabber/mirror.py", line 408, in urlgrab
return self._mirror_try(func, url, kw)
File "/usr/lib/python2.6/site-packages/urlgrabber/mirror.py", line 394, in _mirror_try
return func_ref( *(fullurl,), **kwargs )
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 985, in urlgrab
return self._retry(opts, retryfunc, url, filename)
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 886, in _retry
r = apply(func, (opts,) + args, {})
File "/usr/lib/python2.6/site-packages/urlgrabber/grabber.py", line 980, in retryfunc
apply(cb_func, (obj, )+cb_args, cb_kwargs)
File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 1494, in _checkRepoXML
repoXML = repoMDObject.RepoMD(self.id, filepath)
File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 124, in __init__
self.parse(srcfile)
File "/usr/lib/python2.6/site-packages/yum/repoMDObject.py", line 140, in parse
parser = iterparse(infile)
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1169, in cElementTree_iterparse
_cElementTree_import()
File "/usr/lib/python2.6/site-packages/yum/misc.py", line 1164, in _cElementTree_import
import cElementTree
ImportError: No module named cElementTree
|
Yum使用的是python2.6,你确定一下你的默认的python是2.6还是2.7
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。