yum 命令:python 版本不匹配 [英] yum command : python version mismatch

查看:74
本文介绍了yum 命令:python 版本不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有 Red Hat Linux (Red Hat Enterprise Linux Server 6.5 版(圣地亚哥))和 yum 无法处理消息导入 Python 模块之一时出现问题需要运行 yum.导致此问题的错误是:

I have Red Hat Linux (Red Hat Enterprise Linux Server release 6.5 (Santiago) ) and yum in not working with message There was a problem importing one of the Python modules required to run yum. The error leading to this problem was:

   No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.8 (default, Nov  7 2014, 11:45:08) 
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

python 当前版本为 2.7.8

Current version of python is 2.7.8

感谢任何帮助.

推荐答案

CentOS 6 附带 python 2.6.有人在系统范围内安装了不兼容的 python 版本,这已经破坏了一些东西.不应该这样做.

CentOS 6 ships with python 2.6. Someone installed an incompatible version of python system-wide and that has broken things. That should not have been done.

您需要找出 2.7 版本的 python 是如何安装的并修复它(通过删除不正确的包或删除源安装的 python 或通过修复 $PATH 或其他任何合适).

You need to find out how the 2.7 version of python was installed and fix that (by removing the incorrect package or by removing the source-installed python or by fixing the $PATH or whatever else is appropriate).

为了帮助弄清楚问题到底是什么,我们需要以下命令的输出(作为开始).

To help figure out what the problem is exactly we need the output from the following commands (as a start).

rpm -qa python\* 说什么?

which -a python 说什么?

这篇关于yum 命令:python 版本不匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆