当我在 Fedora 20 Virtualbox 机器上尝试 # yum upgrade 时,我遇到了一个新错误。我给它分配了 3GB 内存,它在 Haswell core i5 上运行
任何修复都值得赞赏!或者这可能是远程存储库问题?
终端输出:
(process:2094): GLib-WARNING **: GError set over the top of a previous GError or uninitialized memory.
This indicates a bug in someone's code. You must ensure an error is NULL before it's set.
The overwriting error message was: Parsing primary.xml error: Start tag expected, '<' not found
Traceback (most recent call last):
File "/bin/yum", line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File "/usr/share/yum-cli/yummain.py", line 355, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 174, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 570, in doCommands
return self.yum_cli_commands[self.basecmd].doCommand(self, self.basecmd, self.extcmds)
File "/usr/share/yum-cli/yumcommands.py", line 494, in doCommand
ret = base.updatePkgs(extcmds, update_to=(basecmd == 'update-to'))
File "/usr/share/yum-cli/cli.py", line 1012, in updatePkgs
self.update()
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 4995, in update
updates = self.up.getUpdatesTuples()
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1090, in <lambda>
up = property(fget=lambda self: self._getUpdates(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 836, in _getUpdates
self._up = rpmUtils.updates.Updates(self.rpmdb.simplePkgList(), self.pkgSack.simplePkgList())
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 1071, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.7/site-packages/yum/__init__.py", line 776, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.7/site-packages/yum/repos.py", line 383, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.7/site-packages/yum/yumRepo.py", line 260, in populate
dobj = repo_cache_function(xml, csum)
File "/usr/lib64/python2.7/site-packages/sqlitecachec.py", line 46, in getPrimary
self.repoid))
TypeError: Parsing primary.xml error: Document is empty
答案1
我会跑:
yum clean all
yum update
这将清除 yum 目录中的缓存文件,并希望用未损坏的文件刷新它们。