if a proxy or similar is necessary `net.git-fetch-with-cli`, Rust Complete `Couldn‘t resolve host name (Coul

linux rust download dependency error
if a proxy or similar is necessary net.git-fetch-with-cli
Create config in cargo
vi ~/.cargo/config
1
add proxy

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

Or modify the download warehouse

[source.crates-io]
registry = "https://github.com/rust-lang/crates.io-index"
replace-with = 'ustc'
[source.ustc]
registry = "git://mirrors.ustc.edu.cn/crates.io-index"

Pro test, modify and download the warehouse.

Solution to the error in compiling couldn't resolve host name (could not resolve host: Crites) by rust

When compiling the rust source program, the following couldn’t resolve host name (couldn’t resolve host: Crites) errors may occur (see https://github.com/ustclug/discussions/issues/294 )。

A temporary solution is to add the environment variable cargo when running cargo_ HTTP_ MULTIPLEXING=false。 The function is to cancel parallel downloads. For specific reasons, please refer to the error report of building rustc after using the image.

Pro test passed!

Read More: