我之前用Python 2.7覆盖了/ usr / bin / python。 CentOS需要Python 2.6.6但我已经重新安装了Python 2.6.6。然而,百胜还是不起作用。
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.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
我的Python 2.6.6安装似乎缺少yum站点包:
# rpm -V yum
...
missing /usr/lib/python2.6/site-packages/yum
...
我应该从哪里安装Python 2.6.6?
答案 0 :(得分:0)
目录/usr/lib/python2.6/site-packages/yum
属于yum包(因为在验证yum包时报告为丢失),因此重新安装yum
包以修复它。将文件安装到/usr/lib/python2.6/
的其他软件包也可能丢失了文件,因此可能存在类似的问题。