启动Apache 报这个错:
Invalid command 'PythonHandler',perhaps misspelled or defined by a module not included in the server configuration
是因为没有mod_python.so模块的缘故,我们需要手工编译安装mod_python。
安装 mod_python 中出现 apxs:Error: Command failed with rc=65536
出错信息:
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'
将源代码里的 src/connobject.c文件中
-!(b == APR_BRIGADE_SENTINEL(b) ||
//replcae
+!(b == APR_BRIGADE_SENTINEL(bb) ||
结果 make 下果然 通过了。

但是在make install的过程中,总提示:
/usr/bin/install -c src/mod_python.so /usr/local/apache2/modules
/usr/bin/install: cannot stat 'src/mod_python.so': No such file or directory
make[1]: *** [install_dso] Error 1
make[1]: Leaving directory '/home/hobb/mod_python-3.3.1'
make: *** [install] Error 2

最简单的方法是这样的:
mv /usr/local/httpd/build/libtool /usr/local/httpd/build/libtool.old
ln -s /usr/bin/libtool /usr/local/httpd/build/libtool
方才明白,自己走了多少弯路,其实只要link一下libtool就可以了!