Hi:
I have the following setup:
RHEL3.0
MySQL 3.23.58
I am trying to install mysql-python to use roundup issue tracking application, which requires mysql-python to access mysql database. I did not get too far until I have this error:
/usr/local/bin/python2.3 setup.py build
running build
running build_py
running build_ext
building '_mysql' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.3 -c _mysql.c -o build/temp.linux-i686-2.3/_mysql.o -I'/usr/include/mysql'
_mysql.c:41:19: mysql.h: No such file or directory
_mysql.c:42:26: mysqld_error.h: No such file or directory
_mysql.c:43:20: errmsg.h: No such file or directory
error: command 'gcc' failed with exit status 1
I have all (3) files in /usr/include/mysql ...
Can someone provide starting push to get me going?
Thanks!
DC
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thank you! The splitting of the line into 3 separate steps was the solution. BTW, it looks like the export of mysqlclient has to be done for RHEL3.0 too.
Thanks again!
DC
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For some reason on Fedora/Red Hat they decided to make mysql_config return quoted values for library and include paths; this makes a certain amount of sense if you think there might be spaces in the path, but it is not normally needed for anything UNIX-like. There is a fix for this in MySQL-python-1.2.1c1.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi:
I have the following setup:
RHEL3.0
MySQL 3.23.58
I am trying to install mysql-python to use roundup issue tracking application, which requires mysql-python to access mysql database. I did not get too far until I have this error:
/usr/local/bin/python2.3 setup.py build
running build
running build_py
running build_ext
building '_mysql' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.3 -c _mysql.c -o build/temp.linux-i686-2.3/_mysql.o -I'/usr/include/mysql'
_mysql.c:41:19: mysql.h: No such file or directory
_mysql.c:42:26: mysqld_error.h: No such file or directory
_mysql.c:43:20: errmsg.h: No such file or directory
error: command 'gcc' failed with exit status 1
I have all (3) files in /usr/include/mysql ...
Can someone provide starting push to get me going?
Thanks!
DC
Please forgive long screen dump... Here are the details:
[MySQL-python-1.2.1c1]# /usr/local/bin/python2.3 setup.py build
running build
running build_py
creating build
creating build/lib.linux-i686-2.3
copying _mysql_exceptions.py -> build/lib.linux-i686-2.3
creating build/lib.linux-i686-2.3/MySQLdb
copying MySQLdb/init.py -> build/lib.linux-i686-2.3/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-i686-2.3/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-i686-2.3/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-i686-2.3/MySQLdb
copying MySQLdb/sets.py -> build/lib.linux-i686-2.3/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-i686-2.3/MySQLdb
copying MySQLdb/stringtimes.py -> build/lib.linux-i686-2.3/MySQLdb
copying MySQLdb/mxdatetimes.py -> build/lib.linux-i686-2.3/MySQLdb
copying MySQLdb/pytimes.py -> build/lib.linux-i686-2.3/MySQLdb
creating build/lib.linux-i686-2.3/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.linux-i686-2.3/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-i686-2.3/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-i686-2.3/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-i686-2.3/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-i686-2.3/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-i686-2.3/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-i686-2.3/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-i686-2.3
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.3 -c _mysql.c -o build/temp.linux-i686-2.3/_mysql.o -I'/usr/include/mysql'
_mysql.c:41:19: mysql.h: No such file or directory
_mysql.c:42:26: mysqld_error.h: No such file or directory
_mysql.c:43:20: errmsg.h: No such file or directory
error: command 'gcc' failed with exit status 1
I think I have same bad mistake as before. Is a link missing? Is it possible to know what it is from the above?
Thank you for your help.
DC
This worked for me:
In setup.py line 66 I changed this line
into
Then I could do setup.py build
If you're using the default mysql installation in fedora core 3 you will probably have to do this first:
export mysqlclient=mysqlclient
The quotes are still there, so the fix must not be right yet.
Dagur and Andy-
Thank you! The splitting of the line into 3 separate steps was the solution. BTW, it looks like the export of mysqlclient has to be done for RHEL3.0 too.
Thanks again!
DC
For some reason on Fedora/Red Hat they decided to make mysql_config return quoted values for library and include paths; this makes a certain amount of sense if you think there might be spaces in the path, but it is not normally needed for anything UNIX-like. There is a fix for this in MySQL-python-1.2.1c1.