我在CentOS上安装mysqldb但是不能。我需要使用yum但是当我键入yum时它会给我以下错误。
root@osp [/home/hmm/RentalWanted]# 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.3 (default, Dec 11 2012, 20:12:43)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
我指的是this链接,因为Simeon建议解决方案并尝试下载这些rpms
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-2.4.3-46.el5_8.2.i386.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-devel-2.4.3-46.el5_8.2.i386.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-libs-2.4.3-46.el5_8.2.i386.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-tools-2.4.3-46.el5_8.2.i386.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/tix-8.4.0-11.fc6.i386.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/tix-devel-8.4.0-11.fc6.i386.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/tkinter-2.4.3-46.el5_8.2.i386.rpm
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/yum-3.2.22-39.el5.centos.noarch.rpm
我在下载时遇到错误
wget http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-tools-2.4.3-46.el5_8.2.i386.rpm
--2014-12-08 01:58:40-- http://mirror.centos.org/centos/5/os/x86_64/CentOS/python-tools-2.4.3-46.el5_8.2.i386.rpm
Resolving mirror.centos.org... 216.172.56.29
Connecting to mirror.centos.org|216.172.56.29|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2014-12-08 01:58:40 ERROR 404: Not Found.
答案 0 :(得分:0)
你应该看到this link和你一样的问题。尝试下载此rpm:
蟒-2.4.3-46.el5_8.2.i386.rpm
python-devel-2.4.3-46.el5_8.2.i386.rpm
python-libs-2.4.3-46.el5_8.2.i386.rpm
python-tools-2.4.3-46.el5_8.2.i386.rpm
TIX-8.4.0-11.fc6.i386.rpm
TIX-devel的-8.4.0-11.fc6.i386.rpm
TKinter的2.4.3-46.el5_8.2.i386.rpm
荫-3.2.22-39.el5.centos.noarch.rpm