Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

rustup install stable error during download

Tags:

ubuntu

rust

I install Rust with command:

$ curl -sSf https://static.rust-lang.org/rustup.sh | sh

when I run:

$ rustc main.rs

this appeared:

error: no default toolchain configured

so I run:

rustup install stable

then:

info: downloading component 'rust-std'
 23.2 MiB /  56.2 MiB ( 41 %)  67.2 KiB/s ETA: 503 s                error: component download failed for rust-std-x86_64-unknown-linux-gnu
info: caused by: could not download file from 'https://static.rust-lang.org/dist/2018-07-10/rust-std-1.27.1-x86_64-unknown-linux-gnu.tar.xz' to '/home/kwebi/.rustup/downloads/d3b0d00357cfaecf85651bea6f1d72793a5a859b6b07e9613ba21285922d5d58.partial'
info: caused by: error during download
info: caused by: [56] Failure when receiving data from the peer (OpenSSL SSL_read: error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac, errno 0)

at the first,I use the follow to install rust, the error information printed as before, there is a download error:

$ curl https://sh.rustup.rs -sSf | sh
curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104
rustup: command failed: downloader https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init /tmp/tmp.2EZ69sGKWR/rustup-init

what can I do to install rust currently and completely?

like image 212
kwebi Avatar asked Nov 30 '25 01:11

kwebi


2 Answers

I have solved this problem with follows:

rustup update
rustup default stable
sudo apt-get install gcc
like image 186
kwebi Avatar answered Dec 03 '25 23:12

kwebi


In my case, I removed curl installed through snap and reinstalled it through apt. And that solved my problem.

like image 35
Prakash Bhattarai Avatar answered Dec 04 '25 00:12

Prakash Bhattarai



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!