Possible reasons for the shell's "not found" response?

What are all the possible reasons that the shell would respond with "not found" when trying to run an executable?

  • The executable definitely exists and has execute permission (chmod +x).
  • ldd indicates that all dependencies are present.
  • file indicates that the executable is compiled for the correct architecture (no reason why it shouldn’t be, it’s compiled along with the rest of the system in a Yocto build).

What other reasons could there be?

Asked By: Dane


Given a binary with executable permissions, a common reason for “not found” error messages is that the dynamic loader requested by the binary doesn’t exist. You can check this using readelf:

$ readelf -l /path/to/binary | grep interpreter
      [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]

If that interpreter doesn’t exist, the executable will fail to run with a “not found” error. See Getting "Not found" message when running a 32-bit binary on a 64-bit system for details.

Answered By: Stephen Kitt
Categories: Answers Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.