在CentOS 5.3上编译Python 2.6的mod_wsgi时出错
我在CentOS 5.3上运行一个网站。我知道如果把默认的Python 2.4升级了,CentOS会出问题。我按照这个网站的步骤(http://www.question-defense.com/2009/12/25/how-to-install-python-2-6-on-centos-5-without-breaking-yum)成功安装了Python 2.6。
现在如果我输入“python”,它会运行Python 2.4;如果我输入“python26”,它就会运行Python 2.6。
我正在尝试编译mod_wsgi-3.2。当我运行./configure时,它只识别Python 2.4的环境。我试过用--with-python=/usr/bin/python26这个命令,但这样“make”命令就不工作了。
有人能帮我解答一下吗?
提前谢谢你。
抱歉,输出内容太长了。
最后是这样的。
mod_wsgi.c:14519: error: 'AuthObject' has no member named 'r' mod_wsgi.c:14523:
error: 'AuthObject' has no member named 'log' mod_wsgi.c:14526:
error: 'PyExc_AttributeError' undeclared (first use in this function) mod_wsgi.c:14528:
error: 'AuthObject' has no member named 'log' mod_wsgi.c:14541: error: expected expression before ')' token mod_wsgi.c:14548:
rror: expected ';' before 'ap_log_rerror' mod_wsgi.c:14553:
error: expected ';' before '}' token mod_wsgi.c:14558:
error: too many arguments to function 'wsgi_log_python_error' mod_wsgi.c:14563:
error: expected expression before 'module' apxs:
Error: Command failed with rc=65536 . make: *** [mod_wsgi.la] Error 1
谢谢
1 个回答
1
你需要安装Apache和Python的开发包。去看看安装mod_wsgi的说明,它会告诉你这些信息。可以参考:
http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide
或者查看mod_wsgi源代码里的README文件。