在包含32位python解释器的64位linux上编译mod_wsgi

时间:2013-04-16 08:04:14

标签: python 32bit-64bit mod-wsgi

当我尝试在包含32位python解释器的linux系统(64位)上编译mod_wsgi时,我遇到了问题。

当我跑步时:

./configure --with-apxs=/x/home16/eveljee/httpd-2.4.4/bin/apxs --with-python=/x/home16/eveljee/python32/bin/python2.6

我得到了

checking Apache version... 2.4.4
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
/x/home16/eveljee/python32/bin/python2.6: error while loading shared libraries: libpython2.6.so.1.0: wrong ELF class: ELFCLASS64
configure: creating ./config.status
config.status: creating Makefile

我意识到如果我使用64位python解释器,问题将得到解决。但由于某些原因,我无法更改我的python解释器。是否有任何其他解决方案来解决这个问题? 另请注意,我在系统上没有root访问权限

1 个答案:

答案 0 :(得分:0)

不支持在64位Linux中加载32位库,主要是因为指针存在问题。 64位计算机的地址可以超过4GB,这根本不适合32位指针。

请注意,它不是不可能(Windows会这样做),但它很复杂。

为什么不在主目录中安装64位Python?它不会干扰系统的默认Python。