- 论坛徽章:
- 0
|
yum 不能使用,提示以下错误提示:
#yum update
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
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 309, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 178, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 345, in doCommands
self._getTs(needTsRemove)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in _getTs
self._getTsInfo(remove_only)
File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in _getTsInfo
pkgSack = self.pkgSack
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 661, in <lambda>
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 501, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 260, in populateSack
sack.populate(repo, mdtype, callback, cacheonly)
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 190, in populate
dobj = repo_cache_function(xml, csum)
File "/usr/lib/python2.4/site-packages/sqlitecachec.py", line 42, in getPrimary
self.repoid))
TypeError: Parsing primary.xml error: Start tag expected, '<' not found
网上看了下说是因为RPM数据库出现损坏导致的,它导致所有的软件的升级、安装甚至是删除都会出现问题,终端出现乱码,YUMEX也用不成,RPM命令也用不成。按以下方法操作后,问题依旧:
$ su 切换到root权限
# rm -f /var/lib/rpm/__db.* 将rpm所用的数据库删除 ;这一步最好把_db.*备份一下
# rpm --rebuilddb 重建该数据库
# yum clean all 清除YUM缓存
请问还有可能是哪里问题? |
|