2013-04-16 103 views
1

當我試圖在包含32位python解釋器的linux系統(64位)上編譯mod_wsgi時,我遇到了問題。編譯包含32位python解釋器的64位linux上的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解釋器。是否有解決此問題的其他解決方案? 另外請注意,我沒有在系統上的根訪問

回答

0

不支持在64位linux中加載32位庫,主要是因爲指針的問題。 64位機器的地址可能高於4GB,這不符合32位指針。

請注意,它不是不可能(窗口它),但它很複雜。

爲什麼不在你的主目錄中安裝一個64位的Python?它不會干擾系統的默認Python。

+0

我已經嘗試安裝一個64位的Python解釋器和mod_wsgi成功安裝。不過,我仍然收到內部服務器錯誤(500)。當我檢查日誌時,它說它給了我一個導入錯誤:從cStringIO導入StringIO爲_StringIO [Mon Apr 15 23:13:09.251774 2013] [:error] [pid 8724:tid 1109965120] [client 10.239.37.53: 62869] ImportError:/x/opt/pp/lib/python2.6/lib-dynload/cStringIO.so:錯誤的ELF類:ELFCLASS32 – Ejaz

+0

您不能在使用PYTHONPATH的不同Python安裝中指向mod_wsgi。必須針對特定版本和位變量進行編譯。 –

+0

@GrahamDumpleton:我刪除了我的評論,因爲它不正確。我看到Ejaz已經將配置過程指向了python實例。 –

相關問題