我正在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”,它将运行python2.4,如果我运行“ python26”,它将运行python2.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


谢谢

最佳答案

您必须同时安装Apache和Python的开发包。阅读安装mod_wsgi的说明,它会告诉您这一点。看到:

http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide

或mod_wsgi源代码随附的自述文件。

关于python - 在Cent OS 5.3上为python2.6编译mod_wsgi时出错,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/2883514/

10-11 07:31