需要在公司的机器上安装git,可是在执行yum install的时候却发生了下边的错误。
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 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 104, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 339, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 101, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.5/site-packages/yum/depsolve.py", line 112, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 592, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 435, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.5/site-packages/yum/repos.py", line 251, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 160, in populate
if self._check_db_version(repo, mydbtype):
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 217, in _check_db_version
return repo._check_db_version(mdtype)
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1119, in _check_db_version
repoXML = self.repoXML
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1277, in
repoXML = property(fget=lambda self: self._getRepoXML(),
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1269, in _getRepoXML
self._loadRepoXML(text=self)
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1259, in _loadRepoXML
return self._groupLoadRepoXML(text, ["primary"])
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1243, in _groupLoadRepoXML
if self._commonLoadRepoXML(text):
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 1112, in _commonLoadRepoXML
if not self._groupCheckDataMDNewer():
File "/usr/lib/python2.5/site-packages/yum/yumRepo.py", line 994, in _groupCheckDataMDNewer
old_repo_XML.timestamp > self.repoXML.timestamp):
AttributeError: 'NoneType' object has no attribute 'timestamp'
在网上查找解决办法,将 /etc/yum.conf 文件中的 plugins 设为 0 即可。