在 Cent OS 5.3 上为 python2.6 编译 mod_wsgi 时出错
我正在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您必须安装 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.