在 Cent OS 5.3 上为 python2.6 编译 mod_wsgi 时出错

发布于 2024-09-02 06:18:40 字数 1050 浏览 6 评论 0原文

我正在 CentOS 5.3 上运行一个网站。我知道如果升级默认的 python 2.4,centos 将会崩溃。我关注了这个网站(

现在,如果我运行“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

谢谢

I am running a website on CentOS 5.3. I understand centos will break if the default python 2.4 is upgraded. I followed this site (http://www.question-defense.com/2009/12/25/how-to-install-python-2-6-on-centos-5-without-breaking-yum) and got python 2.6 installed.

Now if I run "python" it runs python2.4 and if I run "python26" it runs python2.6.

I am trying to compile mod_wsgi-3.2. When it run ./configure it takes only python 2.4 environment. I have tried using the --with-python=/usr/bin/python26. That way, "make" command does not work.

Can someone throw some light on this?

Thanks in advance

Sorry for that. The output is too long.

It ends this way.

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

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哽咽笑 2024-09-09 06:18:40

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

http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide< /a>

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

You must install the development packages for both Apache and Python. Read the instructions for installing mod_wsgi and it tells you that. See:

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

or the README that comes with the mod_wsgi source code.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文