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

python模块造成的yum简单报错笔记!

时间:2016-09-07 11:08:15      阅读:964      评论:0      收藏:0      [点我收藏+]

标签:python模块造成的yum简单报错笔记!

[root@node6 yum.repos.d]# yum clean all

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, Sep  5 2016, 17:22:38) 

[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)]


If you cannot solve this problem yourself, please go to 

the yum faq at:

  http://yum.baseurl.org/wiki/Faq

  


[root@node6 yum.repos.d]#

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

大概是自定义安装python造成

[root@node6 yum.repos.d]# python

Python 2.7.8 (default, Sep  5 2016, 17:22:38) 

[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>>

修改过来:

[root@node6 ~]# cd /usr/bin/

[root@node6 bin]# mv python.bak python

mv:是否覆盖"python"? y

[root@node6 bin]# python

python         python2.6.bak  python2.bak    

[root@node6 bin]# python

Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36) 

[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2

Type "help", "copyright", "credits" or "license" for more information.

>>>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

[root@node6 bin]# yum clean all

已加载插件:fastestmirror

Cleaning repos: base elrepo epel epel-debuginfo epel-source extras ren updates

清理一切

Cleaning up list of fastest mirrors

[root@node6 bin]#

yum list

#############################################

可以使用!

本文出自 “renzhiyuan@chinacfsc.com” 博客,请务必保留此出处http://renzhiyuan.blog.51cto.com/10433137/1847094

python模块造成的yum简单报错笔记!

标签:python模块造成的yum简单报错笔记!

原文地址:http://renzhiyuan.blog.51cto.com/10433137/1847094

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