D CGI test: linux.so.2: bad ELF interpreter: No such file or directory

Robert Clipsham robert at octarineparrot.com
Mon Apr 25 13:58:56 PDT 2011


On 25/04/2011 21:38, Nick Sabalausky wrote:
> Works on Windows command line and through IIS. And it works on my Kubuntu
> 10.6 command line. But if I copy the executable from my Kubuntu box to my
> web host's Debian server: Running it through Apache gives me a 500, and
> running it directly with ssh gives me:
>
> linux.so.2: bad ELF interpreter: No such file or directory
>
> I assume that error message is the cause of the 500 (can't tell for sure
> because the 500 isn't even showing up in my Apache error logs). But I'm not
> enough of a linux expert to have the slightest clue what that error message
> is all about. I don't need to actually compile it *on* the server do I? I
> would have thought that all (or at least most) Linux distros used the same
> executable format - especially (K)Ubuntu and Debian.

This is probably occurring due to different versions of dynamic 
libraries on the kubuntu and debian boxes. ldd <executable> will tell 
you which versions the application is linking against, it's probably 
libc that's the issue, or one of the other core libraries. The solution 
is either to link against the correct library version, or statically 
link the version you need. Most likely the version of debian on the 
server uses an older library, which you'll need to link against.

-- 
Robert
http://octarineparrot.com/


More information about the Digitalmars-d-learn mailing list