安装一个软件时,不能正常编译,提示说缺少c++编译器,于是运行如下命令:
yum install -y gcc gcc-c++
但是报了如下的错误 :
[root@AY1309281745Z pcre-8.33]# yum install -y gcc gcc-c++
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.5 (default, Sep 29 2013, 15:51:10)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-3)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
[root@AY13092813eZ pcre-8.33]#
但是一想,作为服务器一般是不可能缺少这样重要的东西的,提示是说不能导入一个yum模块,才想到我重新装了python2.7,把python2.7.py软链接到了python命令,然后我换回来就可以再次正常使用yum命令了