python - 在 SUSE 11 服务器上安装 mod_wsgi 时出错

标签 python django mod-wsgi

apache版本:2.2.6

Python 版本:2.6

./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/bin/python 的结果没问题,但只是出现了一些错误make时如下:

....
mod_wsgi.c:14430: error: expected expression before âmoduleâ
mod_wsgi.c:14431: error: expected identifier or â(â before â=â token
mod_wsgi.c:14446: error: expected expression before âmoduleâ
mod_wsgi.c:14447: error: âmodule_dictâ undeclared (first use in this function)
mod_wsgi.c:14448: error: âobjectâ undeclared (first use in this function)
mod_wsgi.c:14450: error: expected expression before âmoduleâ
mod_wsgi.c:14454: error: âvarsâ undeclared (first use in this function)
mod_wsgi.c:14455: error: âargsâ undeclared (first use in this function)
mod_wsgi.c:14456: error: âresultâ undeclared (first use in this function)
mod_wsgi.c:14457: error: âmethodâ undeclared (first use in this function)
mod_wsgi.c:14474: error: âPy_Noneâ undeclared (first use in this function)
mod_wsgi.c:14488: error: âPy_Trueâ undeclared (first use in this function)
mod_wsgi.c:14491: error: âPy_Falseâ undeclared (first use in this function)
mod_wsgi.c:14503: error: âPyExc_TypeErrorâ undeclared (first use in this function)
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: error: 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.7.2 解决了这个问题;如果你浏览不同的论坛,你会发现一些 python 库是在 32 位系统上编译的,而你可能正在使用 64 位系统。

2.7 或更高版本的 2.6 编译起来很痛苦,因为你必须获得所有缺少的依赖项。你将以这样的方式结束

Python 构建已完成,但未找到构建这些模块所需的位: bsddb185 dl imageop
Sunaudiodev
要查找必要的位,请在 detector_modules() 中的 setup.py 中查找模块名称。

无法构建这些模块: _curses_面板

运行 build_scripts

这些库都已被折旧,因此按原样进行安装是安全的

关于python - 在 SUSE 11 服务器上安装 mod_wsgi 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6053981/

相关文章:

python - 将 Excel 文件加载到 numpy 二维数组中

python - 如何使用seaborn relplot绘制多个数据帧的数据

Python/Django - 组织样式表和脚本

python - Pyramid - fanstatic应用程序在apache wsgi模块下找不到静态资源

python - request.path 和 url_for 在 mod_wsgi 下的 Flask 中不匹配

python - Python 中 1 到 N 之间的所有质数之和 [第 2 部分]

python - 如何对 python 说 (a+b) = (b+a) 和 (a*b) = (b*a)

Django:用于排除第一个条目的循环

Django Heroku 引发 ValueError ("Missing staticfiles manifest entry for ' %s'"% clean_name)

python - Apache 使用 mod_wsgi 处理多个域