No module named yum 错误
在centos上,yum工具是一个很好用、很强大的工具,在系统一些软件升级之后,特别是python升级之后,发现yum 不好用了。
出现这样的错误提示
[htML]
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.2 (default, Nov 8 2012, 23:03:00)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
If you cannot solve this problem yourself, please go to
the yum faq at:
https://wiki.linux.duke.edu/YumFaq
错误提示python版本不匹配,修改yum工具默认的python版本。
[html]
vi /usr/bin/yum
打开脚本文件
[html]
#!/usr/bin/python
import Sys
try:
import yum
。。。。。。。
修改为
[html]
#!/usr/bin/python2.4
import sys
try: www.2cto.COM
import yum
except ImportError:
因为重新升级或者安装了python,所以重新指定版本。
在centos上,yum工具是一个很好用、很强大的工具,在系统一些软件升级之后,特别是python升级之后,发现yum 不好用了。
出现这样的错误提示
[html]
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.2 (default, Nov 8 2012, 23:03:00)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]
If you cannot solve this problem yourself, please go to
the yum faq at:
https://wiki.linux.duke.edu/YumFaq
错误提示python版本不匹配,修改yum工具默认的python版本。
[html]
vi /usr/bin/yum
打开脚本文件
[html]
#!/usr/bin/python
import sys
try:
import yum
。。。。。。。
修改为
[html]
#!/usr/bin/python2.4
import sys
try: www.2cto.com
import yum
except ImportError:
因为重新升级或者安装了python,所以重新指定版本。
觉得可用,就经常来吧! 欢迎评论哦! html5教程,巧夺天工,精雕玉琢。小宝典献丑了!
声明:本文内容由网友自发贡献,本站不承担相应法律责任。对本内容有异议或投诉,请联系2913721942#qq.com核实处理,我们将尽快回复您,谢谢合作!
若转载请注明出处: No module named yum 错误
本文地址: https://pptw.com/jishu/586495.html