简体   繁体   English

在具有Python 2.6.2的Ubuntu 9.04上安装mod_wsgi 2.5

[英]mod_wsgi 2.5 on Ubuntu 9.04 with Python 2.6.2 installation

Has anybody succeeded with mod_wsgi 2.5 on Ubuntu 9.04 with default Python installation (2.6.2)? 是否有人在默认安装Python(2.6.2)的Ubuntu 9.04上成功使用mod_wsgi 2.5?

I got compilation errors: 我收到编译错误:

mod_wsgi.c:119:2: error: #error Sorry, mod_wsgi requires at least Python 2.3.0.
mod_wsgi.c:123:2: error: #error Sorry, mod_wsgi requires that Python supporting thread.

which Python gives /usr/bin/python and /usr/bin/python -V returns Python 2.6.2 so I'm not sure what's wrong with the 1st one, and honestly I don't know how to check options used in compiling default Python on Ubuntu. 哪个Python提供了/ usr / bin / python和/ usr / bin / python -V返回了Python 2.6.2,所以我不确定第一个错误是什么,老实说,我不知道如何检查编译中使用的选项Ubuntu上的默认Python。

There are a lot of other errors but those 2 looks most relevant. 还有很多其他错误,但是那两个看起来最相关。

What else could be possibly wrong?? 还有什么可能是错误的?

From your errors I see that you're having to compile python extensions. 从您的错误中我看到您必须编译python扩展。 If you haven't already, I suggest you install the python-dev package because it's usually required for compiling python extensions and it's not part of the default installation. 如果还没有,我建议您安装python-dev软件包,因为它通常是编译python扩展所必需的,并且不是默认安装的一部分。

Installing the package is as easy as running: 安装软件包就像运行一样容易:

sudo apt-get install python-dev 须藤apt-get install python-dev

from a command line. 从命令行。

Perhaps the user that the server is running as does not have /usr/bin on its path, and there is another version of python somewhere else on the path that is < 2.3 也许正在运行服务器的用户的路径上没有/ usr / bin,并且路径上其他地方的Python版本小于2.3。

Try: 尝试:

which -a python

to find all of the pythons on your path. 查找路径上的所有python。 Perhaps one of these is what the server is running. 也许其中之一就是服务器正在运行。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM