if a proxy or similar is necessary `net.git

编程入门 行业动态 更新时间:2024-10-21 05:43:21

if a proxy or <a href=https://www.elefans.com/category/jswz/34/1666444.html style=similar is necessary `net.git"/>

if a proxy or similar is necessary `net.git

linux rust下载依赖报错

if a proxy or similar is necessary net.git-fetch-with-cli

在cargo下创建config

vi ~/.cargo/config
1
添加代理

[http]
proxy = "127.0.0.1:7891"
[https]
proxy = "127.0.0.1:7891"

或者修改下载仓库

[source.crates-io]
registry = ".io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu/crates.io-index"

亲测, 修改下载仓库 通过。

Rust编译Couldn‘t resolve host name (Could not resolve host: crates) 错误的解决办法

在编译Rust源程序时,可能会出现如下 Couldn’t resolve host name (Could not resolve host: crates) 错误(见 )。

一个临时的解决方法是在运行 cargo 的时候加入环境变量 CARGO_HTTP_MULTIPLEXING=false。作用是取消并行下载。具体原因可参考用了镜像之后构建rustc报错。

亲测通过!

更多推荐

if a proxy or similar is necessary `net.git

本文发布于:2024-03-12 11:35:08,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1731413.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:similar   proxy   git   net

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!