开发者

64-Bit binary execution error on 64-Bit Centos

While executing one of my C++ Application, I am getting a weird message on one of my Cento x64 box where at the same time another machine with similar configuration is perfectly running the Application.

Error message is:

/myapp: error while loading shared libraries: /myapp: wrong ELF class: ELFCLASS64

N.B: 'myapp' is not some shared library (.so) but actual application itself.

All 3rd party libs being linked with myapp have also been compiled on machine on which I am executing the application. I have compiled libmy开发者_StackOverflow社区sqlpp, libthrift and libACE libraries and anything else necessary has been installed through yum.


Everything is resolved.

Actually I was trying to load my application dynamically using ld-linux.so.2 in order to make use of custom library folder but ld-linux.so.2 only executes 32-Bit binaries. Now I am using ld-linux-x86-64.so.2 and everything seems good :)


There is an excellent in depth article on the wider topic (e.g. running 32 bit compiled apps on 64 bit machines) over at http://www.debian-administration.org/articles/534 titled "Running 32-bit Applications on 64-bit Debian GNU/Linux". The short answer is the ia32 Suite.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜