[root@CentOS66 htdocs]# yum
There was a problem import[separator]ing one of the Python modules
required to run yum. The error leading to this problem was:
No module named rpm
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.5.2 (r252:60911, Jul 2 2010, 11:08:48)
[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
会有这个报错
[root@CentOS66 htdocs]# ls /usr/local/python2.6 这个目录下面有内容
下面有一个python2 和python2.6
后来得知 cenos yum 必须在 python2.4下才能运行
[root@CentOS66 htdocs]# rm -rf /usr/bin/python
[root@CentOS66 htdocs]# ln -s /usr/bin/python2 /usr/bin/python 给一个软连接
最后yum list就可以出来了
编辑回复