rustup: error: could not download file from ...

Arch linux Internet connection has no problem

$ rustup update
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to '/home/alex/.rustup/tmp/n6b91922kkyrvmlh_file'
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-nightly.toml.sha256' to '/home/alex/.rustup/tmp/mb54blu9ah_jdzen_file'

   stable-x86_64-unknown-linux-gnu update failed - rustc 1.22.1 (05e2e1c41 2017-11-22)
  nightly-x86_64-unknown-linux-gnu update failed - rustc 1.24.0-nightly (687d3d15b 2018-01-02)

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 50 (13 by maintainers)

Most upvoted comments

windows10 Internet connection has no problem


Welcome to Rust!

This will download and install the official compiler for the Rust programming
language, and its package manager, Cargo.

It will add the cargo, rustc, rustup and other commands to Cargo's bin
directory, located at:

  C:\Users\xxxx\.cargo\bin

This path will then be added to your PATH environment variable by modifying the
HKEY_CURRENT_USER/Environment/PATH registry key.

You can uninstall at any time with rustup self uninstall and these changes will
be reverted.

Current installation options:

   default host triple: x86_64-pc-windows-msvc
     default toolchain: stable
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1

info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to 'C:\Users\Enyala\.rustup\tmp\3yj89lchh3vfhemb_file'
info: caused by: error during download
info: caused by: [28] Timeout was reached
Press the Enter key to continue.

that’s my first install the Rust program language and I can assess to the office website.but this problem still exist.

It worked after I disabled network proxy…

Any updates to solution for this issue? I’m on Ubuntu 20.04.4 LTS. And I am getting a “unable to get local issuer certificate” error when trying to install with the following command:

curl --proto ‘=https’ --tlsv1.2 -sSf https://sh.rustup.rs | sh

I have strat Tor ( service tor start ) of course after installing the Tor. Then install Rust.

@kinnison Thank you for your suggestion. Snapcraft environment seems to use proxy. I ran some test script on the environment. rustup with curl-backend is OK, and rustup with reqwest-backend is NG.

$ curl https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256
e6118276ddab3e00a967e11583685e3205564e31e4007968056ffd0878db19c0  channel-rust-stable.toml
$ echo $http_proxy
http://10.10.10.1:8222/
$ echo $https_proxy
http://10.10.10.1:8222/
$ ~/.cargo/bin/rustup install stable
info: syncing channel updates for 'stable-arm-unknown-linux-gnueabihf'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to '/root/.cargo/tmp/299821akh41mwhqi_file'
info: caused by: failed to make network request
info: caused by: https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256: timed out
$ RUSTUP_USE_CURL=1 ~/.cargo/bin/rustup install stable
info: syncing channel updates for 'stable-arm-unknown-linux-gnueabihf'
info: latest update on 2019-05-23, rust version 1.35.0 (3c235d560 2019-05-20)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: installing component 'rustc'
info: installing component 'rust-std'
info: installing component 'cargo'

Same issues here, using wsl

try again…

It worked after I disabled network proxy…

Turned off VPN here…

If unset, cURL can’t download.

$ unset http_proxy
$ unset https_proxy
$ curl https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256
curl: (6) Could not resolve host: static.rust-lang.org