gpt4 book ai didi

python - 在 Centos 5.3 上为 python 2.6 编译 mod_wsgi 时出错

转载 作者:太空宇宙 更新时间:2023-11-04 06:30:55 24 4
gpt4 key购买 nike

我在 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 源代码附带的 README。

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

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com