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, Dec 7 2016, 02:54:15)
[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 错误原因:
错误原因:错误信息描述为 yum 所依赖的python 不相符,请安装相对应的python即可。
首先,运行:
结果显示:
果然装了两个版本python
执行python,查看到使用2.7.5的版本
猜测yum调用了高版本的python
查找yum文件,并编辑此py文件
结果:
将
改为:
然后保存OK.
|