RHEL yum 损坏

RHEL yum 损坏

我有从 Amazon AMI 部署的 RHEL,但 yum 不知何故坏了。我必须使用该 AMI,因为上面安装了企业软件。无法回滚到以前的状态。这是除 yum delete 之外的所有 yum 命令的输出:

[root@ip-10-0-7-208 ~]# yum update
Loaded plugins: amazon-id, rhui-lb, security
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 232, in populateSack
    self.doSetup()
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 79, in doSetup
    self.ayum.plugins.run('postreposetup')
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/rhui-lb.py", line 89, in postreposetup_hook
    path = urlparse.urlparse(repo.mirrorlist)[2]
  File "/usr/lib64/python2.4/urlparse.py", line 50, in urlparse
    tuple = urlsplit(url, scheme, allow_fragments)
  File "/usr/lib64/python2.4/urlparse.py", line 89, in urlsplit
    i = url.find(':')
AttributeError: 'NoneType' object has no attribute 'find'

答案1

将你的 yum 软件包更新到最新版本。这与已修复的 yum 错误有关。

Red Hat Bugzilla – Bug 1070879

相关内容