K
K
Kirill Sidorov2010-09-15 17:55:33
linux
Kirill Sidorov, 2010-09-15 17:55:33

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

6 answer(s)
K
Kirill Sidorov, 2010-09-15
@cyberia

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 ...

O
OdobenusRosmarus, 2010-09-15
@OdobenusRosmarus

Look
at ldd /usr/local/somedir/sbin/filename.
It is quite possible that he just lacks some kind of .so library thread

D
dmiceman, 2010-09-15
@dmiceman

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

L
Leonid, 2011-02-21
@bravebug

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

The problem was the type of line break - it was Win (CRLF)

A
azalio, 2010-09-15
@azalio

Most likely it needs some other file to work.
Run strace /usr/local/somedir/sbin and look at the output.

P
pythonsly, 2020-10-31
@pythonsly

I'm getting acquainted with Ubuntu, downloaded the latest version and decided to install Python on it and pay charm to it.
Gives an error: bash: ./paycharm.sh: No such file or directory.
Everything seems to be ls -l the unpacked file. Doesn't want to run.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question