Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/277.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 没有名为Yum的模块用于安装mysqldb_Python_Mysql_Mysql Python - Fatal编程技术网

Python 没有名为Yum的模块用于安装mysqldb

Python 没有名为Yum的模块用于安装mysqldb,python,mysql,mysql-python,Python,Mysql,Mysql Python,我正在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 pac

我正在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
我指的是Simeon为解决方案建议的链接,并尝试下载这些RPM

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.
你应该看到和你一样的问题。尝试下载此rpm:

python-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


yum-3.2.22-39.el5.centos.noarch.rpm

谢谢!如何下载rpm?对不起,我是Linux新手:我知道这是一个非常愚蠢的问题,但我需要知道如何从命令行下载rpm。首先,您需要学习如何搜索。互联网是世界上最强大的东西。如果你知道如何使用搜索引擎。。。你会没事的:如果你不知道。。。你总是会问:我在下载rpmrpm-Uvh python-2.4.3-46.el5_8.2.i386.rpm时仍然有问题错误:打开python-2.4.3-46.el5_8.2.i386.rpm失败:没有这样的文件或目录