Rust install error

command "curl https://sh.rustup.rs -sSf | sh " returned error at install

"""
sh: 1: Invalid: not found
sh: 3: Invalid: not found
sh: 5: There: not found
sh: 6: The: not found
"""

And I downloaded rustup-init file through link, I got the error message as follows:

rustup-init: 1: rustup-init: ELF: not found
rustup-init: 2: rustup-init: Syntax error: "(" unexpected

How can I fix this problem?

I use ubuntu 16.04 LTS

Try curl https://sh.rustup.rs -sSf > rustup then bash rustup or sh rustup. Edit: Removed extension.

Also try opening the rustup file with a text editor after downloading it as above - maybe you're on a proxy that's blocking it.

I downloaded install script file via "curl -sSf https://sh.rustup.rs -o > rustup". But it also complained
with curl at line 63 in rustup-init.sh file.
63 " ensure curl -sSfL "$_url" -o "$_file "
Is it proxy problem?
( I already downloaded and used as standalone file. but I want to manage it with toolchain.)

Maybe you can add the "set -x" at the beginning of the install script and post the detail info at here.

Thanks! :slight_smile:
Error comes from need_ok command failed. (mkdir -p /)
So I directly download via "curl -sSfL https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init" which i got from error message.