Here's my problem. I have just compiled a linux build of tests in my VirtualBox VM. When I run it, I get:

bash: ./tests: No such file or directory

I did some research, and found it could permissions, missing libraries or different architecture. So I checked those:

  • ls -al tests:

    -rwxr-xr-x 1 me me 9948598 2011-02-21 01:54 tests
    
  • file tests

    tests: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped
    
  • uname -a

    Linux DevBox 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux
    
  • ldd tests:

    linux-vdso.so.1 =>  (0x00007fff7db90000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x00007f10ef14c000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f10eee46000)
    libz.so.1 => /lib/libz.so.1 (0x00007f10eec2d000) 
    libm.so.6 => /lib/libm.so.6 (0x00007f10ee9aa000)
    libc.so.6 => /lib/libc.so.6 (0x00007f10ee627000)
    /lib/ld64.so.1 => /lib64/ld-linux-x86-64.so.2 (0x00007f10ef384000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f10ee410000)
    

What's the problem here?

link|improve this question
feedback

4 Answers

up vote 1 down vote accepted

Take a look at this: http://stackoverflow.com/questions/1562071/how-can-i-find-which-elf-dependency-is-not-fulfill

link|improve this answer
That seemed promising, but I think my ELF interpreter is OK: /lib/ld64.so.1 => /lib64/ld-linux-x86-64.so.2 (0x00007f10ef384000) and readelf -l says: [Requesting program interpreter: /lib/ld64.so.1] – nullspace Feb 21 '11 at 17:16
So for some reason I was missing a link: sudo ln -s /lib/ld-linux-x86-64.so.2 /lib/ld64.so.1 made it work. Anybody know why that is? I'm accepting this cause it was the closest and most useful. – nullspace Feb 21 '11 at 19:37
feedback

I think your OS where you're running your binary is 32 bit. You're running a non-compatible binary.

link|improve this answer
1  
What about the uname output? Linux DevBox 2.6.35-25-generic #44-Ubuntu SMP Fri Jan 21 17:40:44 UTC 2011 x86_64 GNU/Linux. It says x86_64. – nullspace Feb 21 '11 at 16:05
feedback

The output is from something inside tests, not tests itself.

link|improve this answer
Can you elaborate at all? You mean one of the libs it is linked with is 32 bit or something, or do you mean it's trying to open a file and failing? – nullspace Feb 21 '11 at 16:20
feedback

Is the file name really "tests" or does it only appear to be like that?

Try renaming the file, does it work? Without pressing TAB?

Perhaps you put in the name a not showing CTRL character somehow doing a copy&paste or pressing some key combination?

Does

stat tests

work if you write tests without pressing TAB?

link|improve this answer
This all worked fine. – nullspace Feb 21 '11 at 19:36
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.