[英]How do I configure mod_wsgi with python that has been built from source code?
I want to build mod_wsgi against a Python which I have built myself from source code in Ubuntu. 我想针对我从Ubuntu中的源代码构建的Python构建mod_wsgi。 (You can see specifically how I built it in How would I build python myself from source code on Ubuntu? )
(您可以在如何从Ubuntu上的源代码中自己构建python中看到特定的构建方式。 )
I tried running this from within the mod_wsgi-3.3 directory: 我尝试从mod_wsgi-3.3目录中运行此文件:
$ sudo ./configure --with-apxs=/usr/local/apache2/bin/apxs \
--with-python=/usr/local/share/man/man1/python2.7.1
which was probably pretty naive since I know that python2.7.1 is just a text file and not an executable, which the command probably expects. 这可能是天真的,因为我知道python2.7.1只是一个文本文件,而不是一个可执行文件,命令可能会期望。 I ended up getting a bunch of Permission denied messages even though I ran it in sudo.
即使我以sudo运行它,我最终还是收到一堆“权限被拒绝”消息。
So how would I build mod_wsgi against a Python that has been built from source code? 那么,如何针对已从源代码构建的Python构建mod_wsgi?
Also, are there any inherent issues I should expect in the future in having the Python I built and the default Ubuntu Python co-existing in separate directories? 此外,在我构建的Python和默认的Ubuntu Python共存于不同的目录中时,我是否应该期待任何固有的问题?
Instead of 代替
./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/local/share/man/man1/python2.7.1
I would assume you would want to use: 我假设您要使用:
./configure --with-apxs=/usr/local/apache2/bin/apxs --with-python=/usr/local/bin/python2.7.1
I think you want to tell mod_wsgi to use the path to the python executable rather than the man page 我认为您想告诉mod_wsgi使用python可执行文件的路径而不是手册页
The documentation is pretty clear about what was required. 该文档非常清楚所需要的内容。
http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide#Configuring_The_Source_Code http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide#Configuring_The_Source_Code
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.