大家好,最近学习python,看了些基础知识,现在想搭建个web开发环境,httpd-2.4.2已经编译成功,python是通过yum安装的,版本是2.7.3。
看网上的测试示例,
需要加载mod_python.so,我在安装mod_python的时候,configure已经通过了,make不能通过,信息如下:
make[1]: 进入目录“/home/mz/SoftWare/mod_python-3.3.1/src”
Compiling for DSO.
/home/mz/SoftWare/http_server/bin/apxs -I/home/mz/SoftWare/mod_python-3.3.1/src/include -I/home/mz/SoftWare/http_server/include -I/usr/include/python2.7 -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c serverobject.c connobject.c filterobject.c hlist.c hlistobject.c finfoobject.c -L/usr/lib64/python2.7/config -Xlinker -export-dynamic -lm -lpython2.7 -lpthread -ldl -lutil -lm
/home/mz/SoftWare/http_server/build/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/home/mz/SoftWare/http_server/include -I/home/mz/SoftWare/http_server/include -I/home/mz/SoftWare/http_server/include -I/home/mz/SoftWare/mod_python-3.3.1/src/include -I/home/mz/SoftWare/http_server/include -I/usr/include/python2.7 -c -o mod_python.lo mod_python.c && touch mod_python.slo
In file included from /usr/include/python2.7/pyconfig.h:6:0,
from /usr/include/python2.7/Python.h:8,
from /home/mz/SoftWare/mod_python-3.3.1/src/include/mod_python.h:80,
from mod_python.c:28:
/usr/include/python2.7/pyconfig-64.h:1170:0: warning: "_POSIX_C_SOURCE" redefined [enabled by default]
/usr/include/features.h:164:0: note: this is the location of the previous definition
/usr/include/python2.7/pyconfig-64.h:1192:0: warning: "_XOPEN_SOURCE" redefined [enabled by default]
/usr/include/features.h:166:0: note: this is the location of the previous definition
mod_python.c: In function 'init_mutexes':
mod_python.c:564:30: error: 'unixd_config' undeclared (first use in this function)
mod_python.c:564:30: note: each undeclared identifier is reported only once for each function it appears in
mod_python.c:565:17: warning: implicit declaration of function 'unixd_set_global_mutex_perms' [-Wimplicit-function-declaration]
mod_python.c: In function 'python_init':
mod_python.c:826:5: warning: initialization from incompatible pointer type [enabled by default]
apxs:Error: Command failed with rc=65536
.
make[1]: *** [
mod_python.so] 错误 1
make[1]: 离开目录“/home/mz/SoftWare/mod_python-3.3.1/src”
make: *** [do_dso] 错误 2
我google了“apxs:Error: Command failed with rc=65536”这个,但是没有找到解决方法。我不知道该怎么弄了,希望高手不吝赐教,谢谢
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/40357
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.