【发布时间】:2015-04-25 05:25:38
【问题描述】:
我遇到了一个问题,我在这里描述了mod_wsgi Apache error with django app
终于到了需要重建 mod_wsgi 的地步。
服务器是 RHEL 6,所以默认安装了 python 2.6,为了运行一些东西,另一个管理员另外安装了 python 2.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
根据https://code.google.com/p/modwsgi/wiki/InstallationIssues,我遇到的问题是编译为32位的python和64位的mod_wsgi之间存在冲突
按照本指南https://www.fir3net.com/Programming/Python/how-do-i-compile-modwgsi-for-python-27.html(和其他人)我正在尝试使用 --enabled-shared 重建 Python2.7,但是在运行 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
Python build finished, but the necessary bits to build these modules were not found:
bsddb185 dl imageop
不知道是不是之前安装的python 2.7的问题。有一种安全的方法可以删除整个 python 2.7 以前的安装吗?不知道这样能不能解决问题。
【问题讨论】:
标签: python django python-2.7 rhel