How to install MySQLdb in Python 2.6 CentOS

后端 未结 4 2074
庸人自扰
庸人自扰 2021-01-18 08:36

I am getting this message when I use yum install mysql-python to install MySQLdb.

Loaded plugins: fastestmirror
Loading mirror speeds from cache         


        
4条回答
  •  南方客
    南方客 (楼主)
    2021-01-18 09:32

    You can install it via yum, it is case sensitive:

    [root@localhost ~]# yum install MySQL-python
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.nfsi.pt
     * extras: mirrors.nfsi.pt
     * updates: mirrors.nfsi.pt
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package MySQL-python.x86_64 0:1.2.3-0.3.c1.1.el6 will be installed
    --> Finished Dependency Resolution
    ...
    

    It works with the following repositories (CentOS 6):

    [root@localhost ~]# yum repolist
    Loaded plugins: fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirrors.nfsi.pt
     * extras: mirrors.nfsi.pt
     * updates: mirrors.nfsi.pt
    repo id      repo name            status
    base         CentOS-6 - Base      6.381
    extras       CentOS-6 - Extras    12
    updates      CentOS-6 - Updates   458
    repolist: 6.851
    

提交回复
热议问题