'gcc' failed with exit status 1 - MySQL-python-1.2.3

I am installing MySQL db for python2.6. I installed it from here but when I am on the line

I extracted the file and when I did

python2.6 setup.py build

it gives a lot of errors and warring and end with some of the lines

_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

EDIT

command

# yum --enablerepo=smartfile install MySQL-python26

it says

 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)

but when I located sqlclient I got

[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

How I can provide link to this? EDIT 2

command

 [root@domain /]# yum whatprovides libmysqlclient.so.15

says

 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

EDIT 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

means mysql and mysql-server are both of same version.


Solution 1:

If you're using smartfile repo, then why not install MySQL-python from that:

# yum --enablerepo=smartfile install MySQL-python26