[Zope-DB] Errors in install MySQL-python-1.2
David Daniel Estévez Durey
ahumboldt at humboldt.e.telefonica.net
Wed Jul 4 05:14:43 EDT 2007
Hello Bin,
The mysqldb Makelife for Mac OS has a bug. You have to do the following
change in that file:
Change:
> return popen("mysql_config --%s"% what)
for:
> return popen("/usr/local/mysql/bin/mysql_config --%s"% what)
And everything should be ok! Good luck!!!
El 03/07/2007, a las 23:52, Bin Hu escribió:
> Hi,
>
> I tried to install MySQL-python-1.2 on Intel Mac running OS X 10.4.10.
> I could not build this package. Could anyone give me some suggestions
> on installing MySQL-python on Mac? Thanks!
>
> Bin
>
>
> python
> ----------------
> Python 2.4.4
>
> gcc -v
> ----------------
>
> Using built-in specs.
> Target: i686-apple-darwin8
> Configured with: /private/var/tmp/gcc/gcc-5367.obj~1/src/configure
> --disable-checking -enable-werror --prefix=/usr --mandir=/share/man
> --enable-languages=c,objc,c++,obj-c++
> --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
> --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
> --build=powerpc-apple-darwin8 --with-arch=nocona --with-tune=generic
> --program-prefix= --host=i686-apple-darwin8
> --target=i686-apple-darwin8
> Thread model: posix
> gcc version 4.0.1 (Apple Computer, Inc. build 5367)
>
> mysql
> ---------------
> mysql-5.0.41-osx10.4-i686 (official binary installation)
>
> Build errors
> -----------------
> $ python setup.py build
> running build
> running build_py
> running build_ext
> sh: line 1: mysql_config: command not found
> sh: line 1: mysql_config: command not found
> sh: line 1: mysql_config: command not found
> building '_mysql' extension
> gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
> -fno-strict-aliasing -Wno-long-double -no-cpp-precomp -mno-fused-madd
> -fno-common -dynamic -DNDEBUG -g -O3
> -I/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4
> -c _mysql.c -o build/temp.macosx-10.3-fat-2.4/_mysql.o
> _mysql.c:41:19: error: mysql.h: No such file or directory
> _mysql.c:41:19: error: mysql.h: No such file or directory
> ......
>
> I tried to add -i /usr/local/mysql/include to gcc and got no error
> message. However, setup.py install gave me the following error
> messages:
>
> $ sudo python setup.py install
> sh: line 1: mysql_config: command not found
> sh: line 1: mysql_config: command not found
> sh: line 1: mysql_config: command not found
> running install
> running build
> running build_py
> running build_ext
> building '_mysql' extension
> gcc -arch i386 -arch ppc -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
> -bundle -undefined dynamic_lookup
> build/temp.macosx-10.3-fat-2.4/_mysql.o -lz -lmysqlclient_r -o
> build/lib.macosx-10.3-fat-2.4/_mysql.so
> /usr//usr/bin/ld: for architecture ppc
> /usr/bin/ld: can't locate file for: -lmysqlclient_r
> bincollect2: /ld: for architecture i386
> /usr/ld returned 1 exit status
> bin/ld: can't locate file for: -lmysqlclient_r
> collect2: ld returned 1 exit status
> lipo: can't open input file: /var/tmp//ccNGrgpw.out (No such file or
> directory)
> error: command 'gcc' failed with exit status 1
More information about the Zope-DB
mailing list