6

I know this question has been asked a lot, but the problem remains fo me:

I have a 64bits ELF executable that I am trying to run on my Kali VM, but it keeps telling me that the file doesn't exist.

The solution most of the time for this problem is the difference of architecture, but my Kali is x86-64:

$ uname -m
  x86_64

like the file (named '8') that I am trying to execute:

file 8
8: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, BuildID[sha1]=0xf3b096c69086131b091d1805894fde4fae0537a0, stripped

EDIT: Error:

 $ chmod +x 8
 $ ./8
 bash: ./8: No such file or directory

EDIT 2 : lld:

linux-vdso.so.1 =>  (0x00007fffe37fe000)
libssl.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 (0x00007f680fac8000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f680f73c000)
libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f680f343000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f680f13f000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f680ef28000)
/lib/ld-linux-x86-64.so.2 => /lib64/ld-linux-x86-64.so.2 (0x00007f680fd49000)

I tried to install the 32 bits library to be sure, but it didn't solve anything neither. I also tried it on my Ubuntu, same issues.

Has anybody an idea on ho to run it ? Here is a link to it if some of you want to try on other architectures: https://www.dropbox.com/s/s3ucka4ufd00zmy/8?dl=0

11
  • Copy and paste the exact error message. Commented Jan 2, 2015 at 0:07
  • Done - I don't understand why people downvotes question so quickly... Commented Jan 2, 2015 at 0:09
  • How about the output of running ldd against it? Commented Jan 2, 2015 at 0:12
  • Done too - I dind't know this command Commented Jan 2, 2015 at 0:14
  • Does ls . work correctly in that directory? We don't need the actual output, just success/failure. Commented Jan 2, 2015 at 0:16

1 Answer 1

7

bash: ./8: No such file or directory

This is caused by the file having an elf interpreter which is not installed on your system.

You can find out which elf interpreter your file is compiled with by running

readelf -l ./8 | grep interpreter

I am guessing that you have /lib/ld-linux-x86-64.so.2 compiled in, whereas the standard 64-bit elf interpreter is /lib64/ld-linux-x86-64.so.2.

The best fix is to correct the build script for your executable (it has something like -Wl,--dynamic-linker=/lib/ld-linux-x86-64.so.2 in it).

Alternatively, creating a symlink:

sudo ln -s /lib64/ld-linux-x86-64.so.2 /lib

will also fix the problem.

Sign up to request clarification or add additional context in comments.

3 Comments

I tried sudo ln -s /lib64/ld-linux-x86-64.so.2 lib but it didn't work for me. Any other thoughts? I have the same problem as with the first guy asking the question.
@warfreak92 Your problem may look very similar, but may be subtly different. You should ask a separate question, and provide your exact details.
alright, @Employed Russian, I opened another question here: superuser.com/questions/1266195/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.