首页 > 编程语言 > 详细

Python升级Yum不能使用解决

时间:2016-05-13 12:58:17      阅读:227      评论: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
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!