【问题标题】:Cannot build mod_wsgi for python2.7 on Scientific Linux无法在 Scientific Linux 上为 python2.7 构建 mod_wsgi
【发布时间】:2014-10-03 02:18:17
【问题描述】:

我有一个使用 python 2.7.5 使用 web.py 开发的网络应用程序。

我需要将它部署在运行 Scientific Linux 6.5 的服务器上。自带python 2.6.6,系统需要这个版本,所以只好并行安装python 2.7.5。

我需要做的是安装使用 python 2.7.5 的 mod_wsgi。我找不到预编译的包,所以我尝试从源代码构建一个。我下载了mod_wsgi-3.4的源码。

我运行配置:

./configure --with-python=/home/mapto/Python-2.7.5/python

并得到回应:

正在检查 apxs2...否

正在检查 apxs.../usr/sbin/apxs

检查 Apache 版本... 2.2.15

配置:创建 ./config.status

config.status: 创建 Makefile

当我运行 make 时失败:

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 对 `.rodata.str1.8' 在制作共享对象时不能使用;用 -fPIC 重新编译

/usr/local/lib/libpython2.7.a:无法读取符号:错误值

collect2: ld 返回 1 个退出状态

apxs:Error: 命令失败,rc=65536

.

make: * [mod_wsgi.la] 错误 1

我该如何解决这个问题?对安装apxs2有帮助吗?如果是这样,我该怎么做? (显然当我执行“yum install httpd-devel”时它安装了 apxs,而不是 apxs2)

【问题讨论】:

    标签: python linux mod-wsgi


    【解决方案1】:

    这对我有用:apxs:Error: Command failed with rc=65536

    由于并行 python 版本,我也必须这样做:Python executable not finding libpython shared library

    【讨论】:

      猜你喜欢
      • 2021-01-31
      • 2022-12-18
      • 2012-08-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-09
      • 1970-01-01
      相关资源
      最近更新 更多