System cannot run binary file - "no such file or directory"

9,747

There are multiple explanations for what might be going on:

  1. You are in the wrong directory. Check by using ls and to find the full path use pwd
  2. The permissions on the file do not allow the program to be an executable. Check with ls -la then the file permissions should have -rwxrwxrwx in some form where if they are not there then there will be a - in it's place. Change it with chmod 775 <BinaryNameHERE>

Check these two possible solutions and also please provide more detail so we can work through your problem.

Share:
9,747

Related videos on Youtube

Jacajack
Author by

Jacajack

Constantly bouncing between electrical engineering, signal processing and computer graphics.

Updated on September 18, 2022

Comments

  • Jacajack
    Jacajack over 1 year

    My problem is that my Ubuntu 14.04 can't run executable files even if they exist. I have arm-none-eabi toolchain downloaded and I wanted to run some executable files with ./ but terminal says "no such file or directory". Then I tried as root user, also nothing. I have added this directory to my path, and it is still nothing. I have no idea what can it be...

    Thanks for help!

    • steeldriver
      steeldriver over 9 years
      Is the executable binary-compatible with your system? Or are you trying to run a 32-bit binary on a 64-bit system for example?
    • Jacajack
      Jacajack over 9 years
      Oh... You may be right! I'm using 64-bit system and I'm not sure if that executable is too.
  • Jacajack
    Jacajack over 9 years
    So. My permissions look like this: "-rwxr-xr-x". And yes, I'm in good directory. I tried "chmod 755" and it still can't see it.
  • Jacajack
    Jacajack over 9 years
    Arm toolchain's readme says "For 64 bit system, 32 bit libc and libncurses are required to run the tools." maybe that is a problem? If so, how can I install those libraries? I can see a lots of versions in synaptic.
  • Jacob Bryan
    Jacob Bryan over 9 years
    Generally unless the program is bleeding edge I'd advise to use libncurses5-dev but probably run sudo aptitude install libncurses5 libc6-i386 I believe the last package is the one you want. Can you provide me with the README install file?
  • Jacajack
    Jacajack over 9 years
    README I think it works now. Tell me if there's anything else you want to warn me about. Anyway thenk's for your time and help! :)