码迷,mamicode.com
首页 > 编程语言 > 详细

升级完python2.7.11后问题

时间:2016-04-13 00:25:42      阅读:194      评论:0      收藏:0      [点我收藏+]

标签:default   possible   provides   leading   version   

安装完python2.7.11后用了几天挺好,但是今天用yum的时候发现了问题

[root@template yum.repos.d]# yum list
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.11 (default, Apr  7 2016, 21:10:55)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-16)]

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

上网查了一下才知道原来yum是需要python环境的,python2.7.11太新了,需要改回旧的版本

which yum

whereis python
vim /usr/bin/yum

 

将#!/usr/bin/python 改为#!/usr/bin/python2.6

 

升级完python2.7.11后问题

标签:default   possible   provides   leading   version   

原文地址:http://wl133.blog.51cto.com/9410504/1763207

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!