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

Python升级Yum不能使用解决

时间:2016-05-13 13:01:14      阅读:185      评论:0      收藏:0      [点我收藏+]

标签:

 

1、系统版本

[root@vm10-254-206-95 ~]# cat /etc/issue
CentOS release 6.4 (Final)
Kernel \r on an \m

 

2、系统默认python版本

[root@vm10-254-206-95 ~]# python -V
Python 2.6.6

 

3、报错信息

技术分享
[root@vm10-254-206-95 ~]# yum
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.
Its possible that the above module doesnt match the
current version of Python, which is:
2.5.4 (r254:67916, Feb 24 2010, 10:03:49)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)]
If you cannot solve this problem yourself, please go to
the yum faq at:
  http://wiki.linux.duke.edu/YumFaq
View Code

解决方法:

[root@vm10-254-206-95 ~]# which yum
/usr/bin/yum

[root@vm10-254-206-95 ~]# vi /usr/bin/yum
#!/usr/bin/python
改为:
#!/usr/bin/python2.6
然后保存OK.

 

Python升级Yum不能使用解决

标签:

原文地址:http://www.cnblogs.com/madsnotes/p/5487416.html

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