1

当我尝试在包含 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 访问权限

4

1 回答 1

0

不支持在 64 位 linux 中加载 32 位库,主要是指针问题。64 位机器可以寻址超过 4GB,这根本不适合 32 位指针。

请注意,这并非不可能(Windows 可以),但它很复杂。

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

于 2013-04-16T08:15:16.330 回答