解决报错:could not download file from 'https://static.rust-lang.org/dist/channel-rus

805 阅读1分钟

本文参考这个链接
www.mdnice.com/writing/0e6…

我是在想在公司网络环境下用window11 专业版安装 rust,安装失败报错:could not download file from 'static.rust-lang.org/dist/channe…'

上网查了才知道是代理的问题,需要先执行如下命令才能安装成功:

$proxy='http://<IP>:<PORT>' \\ 注意这个地方要写上自己可以使用的代理IP和端口
$ENV:HTTP_PROXY=$proxy 
$ENV:HTTPS_PROXY=$proxy
cd ~\Downloads\
.\rustup-init.exe

一般,代理信息可以从下图位置找出:

image.png