Python 固定/添加符号链接

Python 固定/添加符号链接,python,python-2.7,mod-wsgi,Python,Python 2.7,Mod Wsgi,我正在尝试编译mod_wsgi,以便在centos 6.6服务器上与python2.7一起使用 我已下载源代码并运行以下命令- ./configure --with-python=/usr/local/bin/python2.7 --disable-framework 运行良好。但是,当我尝试运行make时,我得到以下结果- /usr/bin/ld: /usr/local/lib/libpython2.7.a(abstract.o): relocation R_X86_64_32 agains

我正在尝试编译mod_wsgi,以便在centos 6.6服务器上与python2.7一起使用

我已下载源代码并运行以下命令-

./configure --with-python=/usr/local/bin/python2.7 --disable-framework
运行良好。但是,当我尝试运行
make
时,我得到以下结果-

/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: *** [src/server/mod_wsgi.la] Error 1
/usr/local/lib/python2.7/config -lpython2.7
    /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
    error: command 'gcc' failed with exit status 1
编辑-我运行了以下命令,我的Python2.7是64位的-

import struct
print struct.calcsize("P") * 8
我还尝试了一个pip2.7安装mod_wsgi,我得到了以下结果-

/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: *** [src/server/mod_wsgi.la] Error 1
/usr/local/lib/python2.7/config -lpython2.7
    /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
    error: command 'gcc' failed with exit status 1
在阅读此处的文件时-

似乎我的符号链接有问题。我将如何创建或替换他们在此处引用的符号链接-

If the version of Python being used was compiled for X86 64 bit architecture and a shared library does exist, but not in the 'config' directory, then adding the missing symlink may be all that is required.
我已经确认Python2.7是一个64位安装,我运行了以下配置,使其确实是一个共享环境-

./configure --prefix=/usr/local --enable-unicode=ucs4 --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"
make && make altinstall

我需要重新编译Python,如以下文档中所示-


在此之后,我能够使用64位版本的mod wsgi。

我需要重新编译Python,如以下文档所示-


在此之后,我能够使用64位版本的mod wsgi。

我必须按照此重新编译我的python2.7安装-我必须按照此重新编译我的python2.7安装-