度娘没有解决方案,求大神指导一下,
错误如下:
/Users/lgy/.cargo/bin/cargo build --message-format=json-diagnostic-rendered-ansi --color=always --package diffFinder --bin diffFinder
Blocking waiting for file lock on package cache
Downloaded bevy_app v0.6.0 (registry ustc
)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
Downloaded bindgen v0.56.0 (registry ustc
)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
Downloaded bytemuck_derive v1.0.1 (registry ustc
)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
Downloaded bytemuck v1.7.3 (registry ustc
)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
Downloaded cache-padded v1.2.0 (registry ustc
)
warning: spurious network error (1 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
error: failed to download from https://crates-io.proxy.ustclug.org/api/v1/crates/spirv/0.2.0+1.5.4/download
Caused by:
[6] Couldn't resolve host name (Could not resolve host: crates)
Process finished with exit code 101
评论区
写评论这是ustc的老feature了
完美解决方法是,来ustc
当然,还有不完美的解法:(使用 nightly 版本时,Crates 源可能会出现 Couldn't resolve host name (Could not resolve host: crates) 错误(见 https://github.com/ustclug/discussions/issues/294)。一个临时的解决方法是在运行 cargo 的时候加入环境变量 CARGO_HTTP_MULTIPLEXING=false。)
換個鏡像源