无法在Scientific Linux上为python2.7生成mod_wsgi

2024-10-01 11:30:51 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一个用网页.py使用Python2.7.5。在

我需要在运行Scientific Linux6.5的服务器上部署它。它是Python2.6.6附带的,系统需要这个版本,所以我不得不并行安装Python2.7.5。在

我需要做的是安装使用python2.7.5的mod_wsgi。我找不到预编译的包,所以我试图从源代码构建一个。我下载了mod wsgi-3.4的源代码。在

我用以下命令运行配置:

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

得到的答复是:

checking for apxs2... no

checking for apxs... /usr/sbin/apxs

checking Apache version... 2.2.15

configure: creating ./config.status

config.status: creating Makefile

当我运行使它失败时:

/usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC

/usr/local/lib/libpython2.7.a: could not read symbols: Bad value

collect2: ld returned 1 exit status

apxs:Error: Command failed with rc=65536

.

make: * [mod_wsgi.la] Error 1

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


Tags: creatingmodconfigwsgifor源代码configureusr