Answer the question
In order to leave comments, you need to log in
The file exists... but "No such file or directory"
There is a file that is an executable binary (maybe I'm wrong with the definition, I had to deal with a non-core business), located in /usr/local/somedir/sbin. I look at ls -l - the file is there, but when I try to access the file I get “No such file or directory”. All actions under root, OS Debian 5 Lenny. Why can this be so?
Answer the question
In order to leave comments, you need to log in
Everything turned out to be much simpler - it turned out to be the wrong architecture ... It turned out to be on VDS i686, although uname -a showed x86_64 ...
Look
at ldd /usr/local/somedir/sbin/filename.
It is quite possible that he just lacks some kind of .so library thread
And it is even more likely that the file begins, for example, like this:
#!/usr/bin/someinterpreter
and this someinterpreter is not in the system :-) That's ten to one that it is.
> It is quite possible that he simply lacks a .so library thread
No, another abuse goes to the missing library.
> Most likely /usr/local/somedir/sbin is not in PATH
bash would say:
[~]$ asdasd
bash: asdasd: command not found
Something similar happened with python script:
$ ls -l -rwxr-xr-x 1 bravebug users 386 Feb 21 00:40 myscript.py* $ ./myscript.py : No such file or directory
Most likely it needs some other file to work.
Run strace /usr/local/somedir/sbin and look at the output.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question