百胜破坏了RHEL 6

时间:2014-03-31 20:12:10

标签: yum rhel6

使用64位RHEL 6,从Yum接收此错误:

[root /]# yum install [package_name]

---Start Error---
<BR><BR>
Traceback (most recent call last):<BR>

       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 288, in user_main 
       errcode = main(args) 
       File "/usr/share/yum-cli/yummain.py", line 140, in main 
       result, resultmsgs = base.doCommands() 
       File "/usr/share/yum-cli/cli.py", line 436, 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 887, in <lambda> 
       pkgSack = property(fget=lambda self: self._getSacks(), 
       File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 669, in _getSacks 
       self.repos.populateSack(which=repos) 
       File "/usr/lib/python2.6/site-packages/yum/repos.py", line 308, in populateSack 
       sack.populate(repo, mdtype, callback, cacheonly) 
       File "/usr/lib/python2.6/site-packages/yum/yumRepo.py", line 187, in populate 
       dobj = repo_cache_function(xml, csum) 
       File "/usr/lib64/python2.6/site-packages/sqlitecachec.py", line 46, in getPrimary 
       self.repoid)) 
    TypeError: Parsing primary.xml error: Start tag expected, '<' not found 


---End Error---

今天刚开始。几天前工作得很好。自上次使用以来,未在此系统上安装任何东西。

已经重建了Python 2.6和Yum 3.4.3。仍然与上面相同的错误。有什么想法吗?

2 个答案:

答案 0 :(得分:1)

清除repo缓存并重建它

yum clean all
yum update

答案 1 :(得分:0)

运行:

sudo su
export LD_LIBRARY_PATH=/usr/lib64:/usr/local/lib
yum clean all
yum update yum

我认为这解决了这个问题。它对我有用。