重建Python和mod_wsgi [英] Re building Python and mod_wsgi

查看:197
本文介绍了重建Python和mod_wsgi的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题,我在这里描述的 mod_wsgi Apache的错误与django应用程序

I had a problem which i described here mod_wsgi Apache error with django app

最后我得到了我需要重建mod_wsgi的点。

finally I got to the point where i need to rebuild mod_wsgi.

服务器是RHEL 6,所以默认情况下安装了python 2.6,为了运行一些东西另一个管理员安装了python 2.7另外

The server is RHEL 6, so have python 2.6 installed by default and in order to run some stuffs another admin installed python 2.7 additionally

现在我有这个问题

/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 我遇到的问题是python被编译为32之间的冲突bit和mod_wsgi到64

According to https://code.google.com/p/modwsgi/wiki/InstallationIssues the problem I have is a conflict between python that was compiled to 32 bit and mod_wsgi to 64

遵循本指南 https://www.fir3net.com/Programming/Python/how-do-i-compile-modwgsi-for-python-27.html (和其他人)我试图用--enabled共享重建Python2.7,但是当我运行make

Following this guide https://www.fir3net.com/Programming/Python/how-do-i-compile-modwgsi-for-python-27.html (and others) I'm trying to rebuild Python2.7 with --enabled-shared , but I got the same error when I run the 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         

I不知道如果问题是以前安装的python 2.7。有一个安全的方式去除整个python 2.7以前的安装?我不知道是否可以解决问题。

I dont know if the problem is the previous installation of python 2.7. There is a safe way to remove whole python 2.7 previous installation? I don't know if that can solve the problem.

推荐答案

最后只需删除/ usr / local / lib内容并重建python和mod_wsgi

Finally just deleted the /usr/local/lib content and rebuild python and mod_wsgi

这篇关于重建Python和mod_wsgi的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆