python模块造成的yum简单报错笔记!,,[[email pr


[[email protected] 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


[[email protected] yum.repos.d]#

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

大概是自定义安装python造成

[[email protected] 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.

>>>

修改过来:

[[email protected] ~]# cd /usr/bin/

[[email protected] bin]# mv python.bak python

mv:是否覆盖"python"? y

[[email protected] bin]# python

python python2.6.bak python2.bak

[[email protected] 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.

>>>

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

[[email protected] bin]# yum clean all

已加载插件:fastestmirror

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

清理一切

Cleaning up list of fastest mirrors

[[email protected] bin]#

yum list

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

可以使用!

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

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

相关内容

    暂无相关文章

评论关闭