D
D
ddhyth2021-01-15 10:35:30
bash
ddhyth, 2021-01-15 10:35:30

Why does it say No such file or directory even though the file exists?

I want to install anaconda
for this, I need to run the script on the command line,
I go on the command line to the directory where the script is located
and prescribe it
, I get the error No such file or directory
Why does this happen.

[email protected]:/home/ut/Downloads# bash ~/Downloads/Anaconda3-2018.12-Linux-x86_64
bash: /root/Downloads/Anaconda3-2018.12-Linux-x86_64: No such file or directory

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
AVKor, 2021-01-15
@ddhyth

Why does it happen.

Because there is no such file. There is one, for example: Anaconda3-2020.11-Linux-x86_64.sh, with .shas an extension.
And you need to install not from the root, but as a regular user.

F
FanatPHP, 2021-01-15
@FanatPHP

It is always necessary to read what is written in the error message.
Preferably with the eyes.
It writes in human language - where we are sitting and what file we are trying to open

/home/ut/Downloads
/root/Downloads/

Doesn't lead to any thoughts?
What does the letter ~ mean?
Well, a completely rhetorical question: since we have moved to the folder with the file, then why specify the path to it?
And finally - it’s not for nothing that all wise guides recommend not to sit under the root

A
Alexey Dmitriev, 2021-01-15
@SignFinder

On Linux, the ~ character is used as shorthand for the user's home directory.
You are sitting as the root user.
Next, please turn on the logic and look at your error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question