安装oursql时出现Gcc错误(Python 3)

2024-09-30 01:20:13 发布

您现在位置:Python中文网/ 问答频道 /正文

我们刚刚升级了我们的服务器,并进入了决赛(ish!)在迁移的各个阶段,我刚刚完成了所需的python模块的安装,但是最后一个模块我遇到了一些问题。在

我的一个同事在他自己的virtualenv(python3)中使用SQLAlchemy,并使用我们的sql作为驱动程序。在

我在尝试安装我们的sql时遇到了几个gcc错误,这让我有点头疼。它似乎在抱怨一个mysql.h文件丢失了-我不确定它在哪里,有人能建议吗?我们已经将mysql升级到5.6,所以我想知道这是否有任何效果。在

非常感谢任何帮助!在

[root@679623-db1:~/oursql-0.9.4]
# python3 setup.py install
running install
running build
running build_ext
skipping 'oursqlx/oursql.c' Cython extension (up-to-date)
building 'oursql' extension
mysql_config --cflags
gcc -pthread -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.4m -c oursqlx/oursql.c -o build/temp.linux-x86_64-3.4/oursqlx/oursql.o -I/usr/include/mysql -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC -fPIC -g -fabi-version=2 -fno-omit-frame-pointer -fno-strict-aliasing -DMY_PTHREAD_FASTMUTEX=1
In file included from oursqlx/oursql.c:235:
oursqlx/compat.h:13:19: error: mysql.h: No such file or directory
oursqlx/compat.h:14:26: error: mysqld_error.h: No such file or directory
oursqlx/compat.h:15:20: error: errmsg.h: No such file or directory
oursqlx/compat.h:19:2: error: #error "This driver requires at least MySQL 4.1.2." 
...

我们已经(据我们所知)安装了所有必需的mysql libs etc:

^{pr2}$

编辑:抱歉,我忘了加上我们正在运行RHEL6


Tags: ornobuildsourcemysqlerrorrunningdirectory

热门问题