我正在为python2.6安装MySQL数据库。 我从这里安装它,但是当我在线上
我提取的文件,当我做到了
python2.6 setup.py build
它给了很多错误和交战,并以一些线路结束
_mysql.c: At top level: _mysql.c:2331: error: â_mysql_ConnectionObjectâ has no member named âopenâ _mysql.c:2338: error: â_mysql_ConnectionObjectâ has no member named âconverterâ _mysql.c:2345: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:2352: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:2359: error: â_mysql_ConnectionObjectâ has no member named âconnectionâ _mysql.c:2422: error: â_mysql_ResultObjectâ has no member named âconverterâ _mysql.c:2422: error: initializer element is not constant _mysql.c:2422: error: (near initialization for â_mysql_ResultObject_memberlist[0].offsetâ) _mysql.c: In function â_mysql_ConnectionObject_getattrâ: _mysql.c:2444: error: â_mysql_ConnectionObjectâ has no member named âopenâ error: command 'gcc' failed with exit status 1
编辑
命令
# yum --enablerepo=smartfile install MySQL-python26
它说
perl-DBD-MySQL-3.0007-2.el5.x86_64 from installed has depsolving problems --> Missing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by package perl-DBD-MySQL-3.0007-2.el5.x86_64 (installed) php-mysql-5.1.6-27.el5_5.3.x86_64 from installed has depsolving problems --> Missing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by package php-mysql-5.1.6-27.el5_5.3.x86_64 (installed) mysql-5.0.77-4.el5_6.6.i386 from base has depsolving problems --> mysql conflicts with MySQL-server php-mysql-5.1.6-27.el5_5.3.x86_64 from installed has depsolving problems --> Missing Dependency: libmysqlclient.so.15()(64bit) is needed by package php-mysql- 5.1.6-27.el5_5.3.x86_64 (installed) perl-DBD-MySQL-3.0007-2.el5.x86_64 from installed has depsolving problems --> Missing Dependency: libmysqlclient.so.15()(64bit) is needed by package perl-DBD- MySQL-3.0007-2.el5.x86_64 (installed) MySQL-python-1.2.1-1.x86_64 from installed has depsolving problems --> Missing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) is needed by package MySQL-python-1.2.1-1.x86_64 (installed) MySQL-python-1.2.1-1.x86_64 from installed has depsolving problems --> Missing Dependency: libmysqlclient_r.so.15()(64bit) is needed by package MySQL- python-1.2.1-1.x86_64 (installed) Error: Missing Dependency: libmysqlclient_r.so.15(libmysqlclient_15)(64bit) is needed by package MySQL-python-1.2.1-1.x86_64 (installed) Error: Missing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by package perl-DBD-MySQL-3.0007-2.el5.x86_64 (installed) Error: Missing Dependency: libmysqlclient_r.so.15()(64bit) is needed by package MySQL-python-1.2.1-1.x86_64 (installed) Error: Missing Dependency: libmysqlclient.so.15()(64bit) is needed by package php-mysql-5.1.6-27.el5_5.3.x86_64 (installed) Error: mysql conflicts with MySQL-server Error: Missing Dependency: libmysqlclient.so.15(libmysqlclient_15)(64bit) is needed by package php-mysql-5.1.6-27.el5_5.3.x86_64 (installed) Error: Missing Dependency: libmysqlclient.so.15()(64bit) is needed by package perl-DBD-MySQL-3.0007-2.el5.x86_64 (installed)
但是当我findsqlclient时,
[root@domain ~]locate libmysqlclient /usr/lib64/mysql/libmysqlclient.so.15 /usr/lib64/mysql/libmysqlclient.so.15.0.0 /usr/lib64/mysql/libmysqlclient_r.so.15 /usr/lib64/mysql/libmysqlclient_r.so.15.0.0
我如何提供这个链接? 编辑2
命令
[root@domain /]# yum whatprovides libmysqlclient.so.15
说
Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirror.steadfast.net * epel: mirror.steadfast.net * extras: mirror.wiredtree.com * updates: mirror.wiredtree.com base | 1.1 kB 00:00 chl | 951 B 00:00 chl-source | 951 B 00:00 epel | 3.7 kB 00:00 epel/primary_db | 3.8 MB 00:00 extras | 2.1 kB 00:00 smartfile | 951 B 00:00 updates | 1.9 kB 00:00 mysql-5.0.77-4.el5_6.6.i386 : MySQL client programs and shared libraries Repo : base Matched from: Other : libmysqlclient.so.15
编辑3
[root@domain ~]# rpm -qa | grep -i mysql
yeilds
mysql-5.0.77-4.el5_6.6 mysql-server-5.0.77-4.el5_6.6 mysql-devel-5.0.77-4.el5_6.6 perl-DBD-MySQL-3.0007-2.el5 php-mysql-5.1.6-27.el5_5.3
意味着mysql和mysql-server都是相同的版本。
如果你使用的是smartfile repo,那么为什么不从那里安装MySQL-python:
# yum --enablerepo=smartfile install MySQL-python26