我下载了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')
Run Code Online (Sandbox Code Playgroud)
我在Windows上并且http_proxy环境变量已正确设置.
我试图"自定义安装",但它没有给我手动提供IP地址的选项:
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
Run Code Online (Sandbox Code Playgroud)
有没有人知道解决方法?
Jim*_*ger 18
我遵循了一个Spex的建议......
将rustup-init.exe下载到〜/ Downloads
在powershell中:
$proxy='http://<IP>:<PORT>'
$ENV:HTTP_PROXY=$proxy
$ENV:HTTPS_PROXY=$proxy
cd ~\Downloads
.\rustup-init.exe
Run Code Online (Sandbox Code Playgroud)我已经测试了上面提到的两个解决方案,并且都有效.谢谢,kennytm和ljedrz!
建议由kennytm,将以下行添加到c:\ Windows\System32\drivers\etc中的hosts文件
13.32.244.72 static.rust-lang.org
由ljedrz建议,使用独立安装程序.在过去,人们可以很容易地找到那些独立的安装程序,但是对于防锈语言站点的最新重组,最初唯一真正弹出的是rustup-init.exe.然而正如@ljedrz在上面的评论中指出的那样,这些独立的安装程序仍然存在,可以在这里找到:各种平台的独立安装程序.
| 归档时间: |
|
| 查看次数: |
4622 次 |
| 最近记录: |