首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >mod_wsgi不会编译-找不到-lpython3.2

mod_wsgi不会编译-找不到-lpython3.2
EN

Server Fault用户
提问于 2012-01-20 23:52:06
回答 1查看 1.4K关注 0票数 0

我正试图在我的web服务器上安装Python3.2和mod_wsgi,但是我没有多少运气。

我下载了Python源文件并使用以下命令编译:

代码语言:javascript
复制
./configure --enable-shared --prefix=/opt/python-3-2 LDFLAGS="-Wl,-rpath /opt/python-3-2/lib"

我还修改了path变量以包含/opt/python-3-2/bin,并从/opt/python-3-2/bin/python创建了一个指向python3二进制文件的符号链接。现在,如果从命令行运行python,就会得到正确的提示符。

代码语言:javascript
复制
> python
Python 3.2.2 (default, Jan 20 2012, 18:14:20)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>

我使用以下设置编译最新版本的mod_wsgi

代码语言:javascript
复制
./configure --with-apxs=/usr/sbin/apxs --with-python=/opt/python-3-2/bin/python3

这会产生以下错误

代码语言:javascript
复制
mod_wsgi.c:8937: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8939: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8941: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8945: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8965: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8967: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c:8970: warning: suggest parentheses around assignment used as truth value
mod_wsgi.c: In function 'wsgi_daemon_worker':
mod_wsgi.c:10279: warning: unused variable 'duration'
mod_wsgi.c:10278: warning: unused variable 'start'
mod_wsgi.c: In function 'wsgi_hook_daemon_handler':
mod_wsgi.c:12499: warning: unused variable 'i'
mod_wsgi.c:12497: warning: unused variable 'elts'
mod_wsgi.c:12496: warning: unused variable 'head'
mod_wsgi.c: In function 'Auth_environ':
mod_wsgi.c:13375: warning: assignment makes pointer from integer without a cast
mod_wsgi.c: At top level:
mod_wsgi.c:7154: warning: 'wsgi_set_py3k_warning_flag' defined but not used
mod_wsgi.c:7856: warning: 'wsgi_set_user_authoritative' defined but not used
mod_wsgi.c:14414: warning: 'wsgi_hook_check_user_id' defined but not used
/usr/lib/apr-1/build/libtool --silent --mode=link gcc -o mod_wsgi.la  -rpath /usr/lib/httpd/modules -module -avoid-version    mod_wsgi.lo -L/opt/python-3-2/lib -L/opt/python-3-2/lib/python3.2/config -lpython3.2 -lpthread -ldl -lutil -lm
/usr/bin/ld: cannot find -lpython3.2
collect2: ld returned 1 exit status
apxs:Error: Command failed with rc=65536

我尝试过从/opt/python-3-2/lib/python3.2/config -> /opt/python-3-2/lib/libpython3.so创建一个符号链接,但是没有帮助。

EN

回答 1

Server Fault用户

回答已采纳

发布于 2012-01-21 12:18:30

您目前必须使用来自Python3.2源代码存储库的mod_wsgi源代码,不能使用mod_wsgi 3.3源代码。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/352134

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档