小编use*_*334的帖子

构建MySQL Python模块时出错

我正在尝试为我的Diskstation 1511 NAS(Intel Atom,Linux 2.6嵌入式)构建一个Python mysql驱动程序安装.我有MySQL-python-1.2.3.虽然MySQL安装在NAS上但它没有包含该mysql_config实用程序,所以编译完整的MySQL安装.

尝试构建时,我收到以下错误消息(请参阅下面的进一步说明).任何帮助表示赞赏.

DiskStation> python2.6 setup.py build
running build
running build_py
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.6/MySQLdb
running build_ext
building '_mysql' extension
/opt/bin/gcc -g -O2 -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -fPIC -Dversion_info=(1,2,3,'final',0) -D__version__=1.2.3 -I/usr/local/mysql-src/include/mysql -I/opt/include/python2.6 -c _mysql.c -o build/temp.linux-x86_64-2.6/_mysql.o
In file included from _mysql.c:36:
/usr/local/mysql-src/include/mysql/my_config.h:1063:1: warning: "SIZEOF_OFF_T" redefined
In file included from /opt/include/python2.6/Python.h:8,
                 from pymemcompat.h:10,
                 from _mysql.c:29:
/opt/include/python2.6/pyconfig.h:907:1: warning: this is the location of the previous definition
_mysql.c: In function '_escape_item':
_mysql.c:1050: warning: dereferencing type-punned pointer …
Run Code Online (Sandbox Code Playgroud)

python mysql mysql-python

3
推荐指数
1
解决办法
1646
查看次数

标签 统计

mysql ×1

mysql-python ×1

python ×1