安装 mod_python 中出现 apxs:Error: Command failed with rc=65536

2011-04-18

准备在服务器上安装 mod_python + django 结果不是 那么顺利。 呵呵。 服务器系统 debian lenny 5.0 出错信息:

connobject.c: In function ‘_conn_read’:
connobject.c:142: error: request for member ‘next’ in something not a structure or union
apxs:Error: Command failed with rc=65536
.
make[1]: *** [mod_python.so] Error 1
make[1]: Leaving directory `/tmp/mod_python-3.3.1/src'
make: *** [do_dso] Error 2
DnsSlave:/tmp/mod_python-3.3.1# vim src/connobject.c 
DnsSlave:/tmp/mod_python-3.3.1# make 
make[1]: Entering directory `/tmp/mod_python-3.3.1/src'

google 搜索了 半天 找到了解决方法: 将源代码里的 src/connobject.c文件中

-!(b == APR_BRIGADE_SENTINEL(b) ||
//replcae
+!(b == APR_BRIGADE_SENTINEL(bb) ||

结果 make 下果然 通过了 呵呵!