【问题标题】:Errors when compiling mod_wsgi for python2.6 on Cent OS 5.3在 Centos 5.3 上为 python 2.6 编译 mod_wsgi 时出错
【发布时间】:2011-02-22 10:25:29
【问题描述】:

我在 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

谢谢

【问题讨论】:

  • 请随时与我们分享输出,而不是让我们猜测。
  • 是什么阻止您使用 python 2.4 运行 wsgi 应用程序?
  • 我正在运行 django,我使用的一些模块至少需要 python2.5 或更高版本

标签: python mod-wsgi centos5


【解决方案1】:

您必须为 Apache 和 Python 安装开发包。阅读安装 mod_wsgi 的说明,它会告诉你。见:

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

或 mod_wsgi 源代码附带的 README。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-09-23
    • 2012-03-20
    • 2010-12-11
    • 1970-01-01
    • 2017-04-07
    • 2021-11-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多