1

有人知道在哪里可以为 arm iPhone 架构编译 python-MySQLdb 吗?或者怎么做?我被困在这一点上:

:~/MySQL-python-1.2.3 root# python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.darwin-10.5-arm-2.5/MySQLdb
running build_ext
building '_mysql' extension
arm-apple-darwin9-gcc -undefined dynamic_lookup -dynamiclib build/temp.darwin-10.5-arm-2.5/_mysql.o -L/usr/local/arm-apple-darwin/lib/ -L/private/var/root/mysql/lib/mysql -lmysqlclient_r -lz -lm -o build/lib.darwin-10.5-arm-2.5/_mysql.dylib
ld: library not found for -lmysqlclient_r
collect2: ld returned 1 exit status
error: command 'arm-apple-darwin9-gcc' failed with exit status 1
4

1 回答 1

0

我解决了前面的问题.....它是 site.cfg 中的 threadsafe = True 我不得不输入 False。现在我有另一个非常相似的问题

python setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.darwin-10.5-arm-2.5/MySQLdb
running build_ext
building '_mysql' extension
arm-apple-darwin9-gcc -undefined dynamic_lookup -dynamiclib build/temp.darwin-10.5-arm-2.5/_mysql.o -L/usr/local/arm-apple-darwin/lib/ -L/private/var/root/mysql/lib/mysql -lmysqlclient -lz -lm -o build/lib.darwin-10.5-arm-2.5/_mysql.dylib
ld: library not found for -lm
collect2: ld returned 1 exit status
error: command 'arm-apple-darwin9-gcc' failed with exit status 1

-lm 需要哪个库?(例如对于 -lz 它需要 zlib 库)。

于 2011-06-09T10:32:57.797 回答