213123 发表于 2016-4-13 09:13:12

升级完python2.7.11后问题

安装完python2.7.11后用了几天挺好,但是今天用yum的时候发现了问题
# yum list
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.11 (default, Apr7 2016, 21:10:55)

If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
上网查了一下才知道原来yum是需要python环境的,python2.7.11太新了,需要改回旧的版本
which yum
whereis python
vim /usr/bin/yum

将#!/usr/bin/python 改为#!/usr/bin/python2.6

页: [1]
查看完整版本: 升级完python2.7.11后问题