I downloaded rustup-init.exe。当我在家里运行它时,一切都很好,但当我在办公室通过代理运行它时,我遇到了一个问题:
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\350627\.rustup\tmp\l3ogei4e89gnb1df_file
info: caused by: error during download
info: caused by: [6] Couldn't resolve host name (Couldn't resolve host 'static.rust-lang.org')我在Windows上,并且正确设置了http_proxy环境变量。
我尝试“自定义安装”,但它不给我手动提供IP地址的选项:
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation有谁知道解决办法吗?
发布于 2017-12-04 08:05:07
我听从了aSpex的建议..。
下载.\rustup-init.exe的$proxy='http://‘$ENV:HTTP_PROXY=$proxy $ENV:HTTPS_PROXY=$proxy cd ~\
发布于 2017-03-17 06:48:07
我已经测试了上面建议的两个解决方案,它们都有效。谢谢,kennytm和ljedrz!
根据kennytm的建议,将以下行添加到c:\Windows\System32\
13.32.244.72 static.rust-lang.org
发布于 2021-10-26 04:19:30
我使用了一组稍微不同的变量。以下是Windows上的bash:
export SSL_CERT_FILE=c:/wherever/bundle.crt
export RUSTUP_USE_REQWEST=1
export http_proxy=http://yourproxy:port
export https_proxy=http:// yourproxy:port
rustup update您需要根据您的公司适当地调整证书的路径。
我使用此工具来检测代理,但您可以使用任何工具来获取URL:
https://stackoverflow.com/questions/42843329
复制相似问题