Monday, April 26, 2010

Linux binary built for 2.0 kernel wouldn't execute on 2.6.x kernel.

Programmer Question

I was installing a binary Linux application on Ubuntu 9.10 x86_64. The app shipped with an old version of gzip (1.2.4), that was compiled for a much older kernel:



$ file gzip 
gzip: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.0.0, stripped


I wasn't able to execute this program. If I tried, this happened:



$ ./gzip
-bash: ./gzip: No such file or directory


ldd was similarly unhappy with this binary:



$ ldd gzip
not a dynamic executable


This isn't a showstopper for me, since my installation has a working version of gzip I can use. But I'm curious: What's the most likely source of this problem? A corrupted file? Or a binary incompatibility due to being built for a much older {kernel,libc,...}?



Find the answer here

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails