Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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

share|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
1  
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

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?

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .