加載共享庫時出錯


1

我正在嘗試在Ubuntu 14.04 x64上運行舊的32位應用程序。我已經通過sudo apt-get install libc6-i386安裝了基本的32位支持,但是現在我收到有關共享庫的令人困惑的消息。似乎是因為它是x64,所以無法加載我的庫,但事實並非如此-整個過程是32位。

[email protected]:~/Desktop/MyApp/bin$ ./MyApp
./MyApp: error while loading shared libraries: libMyApp.so.1: wrong ELF class: ELFCLASS64
[email protected]:~/Desktop/MyApp/bin$ file libMyApp.so.1
libMyApp.so.1: symbolic link to `libMyApp.so.1.0.0' 
[email protected]:~/Desktop/MyApp/bin$ file libMyApp.so.1.0.0
libMyApp.so.1.0.0: ELF 32-bit LSB  shared object, Intel 80386, version 1 (SYSV), dynamically linked, BuildID[sha1]=701d820fbe229a015ba4c56b61015c08bb2c4ac0, not stripped
[email protected]:~/Desktop/MyApp/bin$ file MyApp
MyApp: ELF 32-bit LSB  executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, BuildID[sha1]=1f736df460b9754633c7d67284674da395dc31c8, not stripped

我假設它實際上仍然對諸如libclibssllibwhatsit之類的較低級別的依賴項感到窒息,但是有沒有辦法找出真正的罪魁禍首,卻是反複試驗?

0

I ended up starting over with a fresh CentOS i386 vm, and in the process of getting this running there found that the binary needs libstdc++5. Back on Ubuntu, installing that via sudo apt-get install libstdc++5:i386 seems to have done the trick.