I'm getting some weird behaviour for a binary file I'm trying to run. I'm using Mac OSX snow leopard, and the binary itself is part of labkey software .. built from source.
If I try to run the file using an absolute path it won't work .. failing with an error like
-bash /Users/me/Sources/labkey/build/bin/program: cannot execute binary file
However if I change to the directory /Users/me/Sources/labkey/build/bin/program and run the binary just by typing its name it works fine.
I've explored a number of permutations on executing the file.
From within the directory /Users/me/Sources/labkey/external/osx/bin/program if I attempt to run using
I get the error above, but if I use
I don't get an error.
Any ideas on what could be going wrong?
Thanks for the answers just adding more info; Output of file ./program is;
./Program: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.4, not stripped
Output of "which program" is;