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). lddindicates 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?
#! /path/to/bash. Secondly what doestype -a bashtell you. Also what are the permissions on the bash executable? What does yourecho $SHELLtell you? – Valentin Bajrami Mar 04 '24 at 09:03#! /path/to/bash" - I'm not sure what this means - this is not part of a shell script, just at the terminal.type -a bashdoesn't return anything (no error or other response).echo $SHELLreturns/bin/sh.ls -l /bin/shreturnslrwxrwxrwx 1 root root 23 Mar 4 2024 /bin/sh -> /usr/bin/busybox.nosuid. Other executables work fine, it is just one in particular which is giving this problem. – Dane Mar 04 '24 at 09:11bashinstalled in the system. I see this is abusyboxsystem which for obvious reasons does not include bash. So you are left to usesh. – Valentin Bajrami Mar 04 '24 at 09:16ldd, this doesn’t seem to be a shell script. – Stephen Kitt Mar 04 '24 at 09:17PATHenvironment variable? – Kusalananda Mar 04 '24 at 09:24PATH(the executable is in/sbin) - running the executable directly makes no difference. – Dane Mar 04 '24 at 09:34