Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

This question already has an answer here:

Why would bash claim that a file doesn't exist when it clearly does?

$ ls -l a
-r-x------ 1 configurator configurator 3904 Dec  7 10:36 a

$ file a
a: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped

$ ./a
-bash: ./a: No such file or directory
share|improve this question

marked as duplicate by Braiam, minerz029, Seth, BuZZ-dEE, bodhi.zazen Dec 10 '13 at 20:54

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

are you using 32bit Ubuntu? – John Kirchner Dec 9 '13 at 18:01
No, 64-bit. Linux koandev 3.11.0-14-generic #21-Ubuntu SMP Tue Nov 12 17:04:55 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux – configurator Dec 9 '13 at 18:12
To everyone who's closed this question as a duplicate: Thanks. I very much appreciate the link for more information, and would never have found that answer myself. – configurator Dec 14 '13 at 22:05
up vote 14 down vote accepted

You get this error because you try to run a 32-bit executable on a 64-bit operating system.

And the message No such file or directory does not refer to your executable file called a. Instead the error it refers to a helper program that's needed to run the 32-bit dynamically linked executable a.

You can find more information referring to static and dynamic linkage in this answer.

share|improve this answer
That explains it, thanks. – configurator Dec 9 '13 at 18:46
I just wish the error message was a little friendlier and told me which file it couldn't find so I wouldn't have had to ask this question in the first place... – configurator Dec 9 '13 at 18:46

The problem likely isn't the file you're trying to run, but a file it depends on. Run ldd on the file to see if any of its dependencies can't be found.

share|improve this answer
Interesting. This sounds right, but ldd doesn't help, it just says: adsd: not a dynamic executable – configurator Dec 9 '13 at 18:08

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