【问题标题】:No module called Yum for installtion of mysqldb没有名为 Yum 的模块用于安装 mysql db
【发布时间】:2014-12-08 06:15:24
【问题描述】:

我正在 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.

【问题讨论】:

    标签: python mysql mysql-python


    【解决方案1】:

    您应该看到 this link 遇到与您相同的问题。尝试下载此 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 ..
    • 首先你需要做的是学习如何搜索。互联网是世界上最强大的东西。如果你知道如何使用搜索引擎......你会没事的 :) 如果你不知道......你总是会问别人 :)
    • 我在下载 rpm 时仍然遇到问题
    • rpm -Uvh python-2.4.3-46.el5_8.2.i386.rpm 错误:打开 python-2.4.3-46.el5_8.2.i386.rpm 失败:没有这样的文件或目录
    猜你喜欢
    • 2018-01-05
    • 1970-01-01
    • 2018-10-13
    • 1970-01-01
    • 2016-05-18
    • 1970-01-01
    • 2015-01-21
    • 2018-10-10
    • 2020-10-01
    相关资源
    最近更新 更多