今天在虚拟机上执行yum -y install命令遇到错误,如下:
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.4 (default, Sep 10 2013, 12:19:14)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
If you cannot solve this problem yourself, please go to
the yum faq at:
yum和Python是依赖关系,yum是python的模块,由于上次更新了Python版本导致这次的问题发生。。
解决办法:
[root@nginx1 boot]# python
Python 2.7.4 (default, Sep 10 2013, 12:19:14)
然后修改yum
vi /usr/bin/yum
修改头#!/usr/bin/python => #!/usr/bin/python2.4
再次运行就OK了。
阅读(2870) | 评论(0) | 转发(0) |