大网数据广告活动
服务器运维问答

Yum is interrupted and now gives conflicts

· 52CE 我爱测

I have a Centos 6.7 server, which I wanted to update. So I did yum update However, this was on a live server (not very smart of me, I know). The server ran out of resources and the yum update got interrupted. I can now no longer …

问题原文

原帖链接 · Patrick Steenks · CC BY-SA 3.0

I have a Centos 6.7 server, which I wanted to update. So I did

yum update

However, this was on a live server (not very smart of me, I know). The server ran out of resources and the yum update got interrupted. I can now no longer run yum update. I have tried yum clean all, but can't seem to start yum.

This is what I get:

# yum update
Loaded plugins: downloadonly, fastestmirror
Traceback (most recent call last):
  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 300, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 115, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 229, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 911, in <lambda>
    conf = property(fget=lambda self: self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 335, in _getConfig
    startupconf.pluginconfpath,disabled_plugins,enabled_plugins)
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 564, in doPluginSetup
    plugin_types, confpath, disabled_plugins, enabled_plugins)
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 167, in __init__
    self.run('config')
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/downloadonly.py", line 30, in config_hook
    default=False, help="don't update, just download")
  File "/usr/lib64/python2.6/optparse.py", line 1020, in add_option
    self._check_conflict(option)
  File "/usr/lib64/python2.6/optparse.py", line 995, in _check_conflict
    option)
optparse.OptionConflictError: option --downloadonly: conflicting option string(s): --downloadonly

There seems to be an error with Python, but I'm not sure how to fix it.

社区高分解答

原帖链接 · user9517 · CC BY-SA 3.0

I was asked to look at a system doing this yesterday too. In my case there were 2 versions of yum installed

yum-3.2.29-60.el6.centos.noarch
yum-3.2.29-69.el6.centos.noarch

but removing the newer version (rpm -e) didn't solve the problem. I also had to remove yum-plugin-downloadonly-1.1.30-30.el6.noarch and it's dependent package yum-cron-3.2.29-69.el6.centos.noarch.

Once that was done I was able to run yum again and ran yum-complete-transaction.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-02-11)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。