"mysql.h: No such file or directory" when building MySQL-python

Andy Dustman farcepest at gmail.com
Thu Apr 28 09:59:16 EDT 2005


francescomoi at europe.com wrote:

> I'm trying to build 'MySQL-python-1.2.0' on my Linux FC2:
...
> gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -march=i386
> -mcpu=i686 -D_GNU_SOURCE -fPIC -fPIC -I/usr/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
...
> My server configuration:
> ---------------------------
> [ ]# /usr/local/mysql/bin/mysql_config
> 	--cflags        [-I'/usr/local/mysql/include/mysql']
>         --libs          [-L'/usr/local/mysql/lib/mysql' -lmysqlclient
> -lz -lcrypt -lnsl -lm]
>         --socket        [/tmp/mysql.sock]
>         --port          [3306]
>         --version       [3.23.58]
...
> Any suggestion? Thank you very much.

Fedora's mysql_config puts quotes around the directory names, which
confuses things. Try MySQL-python-1.2.1c1. I don't think this entirely
solves the problem, but I think I know how to fix it for 1.2.1c2. But
try it and report your results here:

https://sourceforge.net/tracker/index.php?func=detail&aid=1146226&group_id=22307&atid=374932




More information about the Python-list mailing list