背景:这两天在做一个项目的负载和读写,redhat 5 x86_64。 还是老套路。要换掉yum..........
换掉以后提示:
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, Mar 11 2012, 03:08:10)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
-------------------------------------------------------------------------------------------------------------------------------------------------------------日了狗了。以前换的时候没有出现过这样的情况。搜之!
网上提供的解决方案
修改文件: vim /usr/bin/yum
修改头#!/usr/bin/python => #!/usr/bin/python2.4
。。。。。。不好用!
最后按照下面这篇文章的安装方法、好了
http://blog.youkuaiyun.com/langeldep/article/details/7348902 (感谢)
这篇博客里面只安装了
##打开网页 http://mirrors.ustc.edu.cn/centos/5/os/i386/CentOS/
##找到下列rpm包,下载并安装
yum-3.2.22-26.el5.centos.noarch.rpm
yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
yum-metadata-parser-1.1.2-3.el5.centos.i386.rpm
这三个包。而我之前装了
yum-2.4.3-4.el4.centos.noarch.rpm
python-elementtree-1.2.6-5.el4.centos.x86_64.rpm
python-sqlite-1.1.7-1.2.1.x86_64.rpm
yum-metadata-parser-1.0-8.el4.centos.x86_64.rpm
python-urlgrabber-2.9.8-2.noarch.rpm
这5个包。所以应该是有冲突了!
如果是redhat6的话可以出门左转!我有一篇更换redhat6 yum 的文章!