yum命令:python版本不匹配

时间:2015-02-02 22:35:14

标签: redhat yum

我有Red Hat Linux (红帽企业Linux服务器版本6.5(圣地亚哥))和yum不使用消息 导入其中一个Python模块时出现问题 要跑yum。导致此问题的错误是:

   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

感谢任何帮助。

1 个答案:

答案 0 :(得分:1)

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

您需要了解如何安装2.7版本的python并修复它(通过删除不正确的软件包或删除源安装的python或修复$PATH或其他任何合适的内容)。 / p>

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

rpm -qa python\*说什么?

which -a python说什么?

相关问题