Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo install出现问题 #389

Closed
bobby-b-song opened this issue May 15, 2022 · 4 comments
Closed

cargo install出现问题 #389

bobby-b-song opened this issue May 15, 2022 · 4 comments

Comments

@bobby-b-song
Copy link

[name@manjaro ~]$ cargo install wrangler --force
    Updating `ustc` index
  Installing wrangler v1.19.12
  Downloaded clicolors-control v1.0.1 (registry `ustc`)
warning: spurious network error (2 tries remaining): [6] Couldn't resolve host name (Could not resolve host: crates)
  Downloaded generic-array v0.14.5 (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)
  Downloaded getrandom v0.1.16 (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)
  Downloaded getrandom v0.2.6 (registry `ustc`)
^Cownloading 224 crates     
@taoky
Copy link
Member

taoky commented May 15, 2022

https://mirrors.ustc.edu.cn/help/crates.io-index.html

使用 nightly 版本时,Crates 源可能会出现 Couldn't resolve host name (Could not resolve host: crates) 错误(见 #294)。一个临时的解决方法是在运行 cargo 的时候加入环境变量 CARGO_HTTP_MULTIPLEXING=false

设置后能否正常下载?

@bobby-b-song
Copy link
Author

使用这个方法能解决,但是我用的是stable branch

[name@manjaro ~]$ rustc --version
rustc 1.60.0 (7737e0b5c 2022-04-04)
[name@manjaro ~]$ cargo --version
cargo 1.60.0 (d1fd9fe 2022-03-01)

@taoky
Copy link
Member

taoky commented May 15, 2022

使用这个方法能解决,但是我用的是stable branch

[name@manjaro ~]$ rustc --version
rustc 1.60.0 (7737e0b5c 2022-04-04)
[name@manjaro ~]$ cargo --version
cargo 1.60.0 (d1fd9fe 2022-03-01)

目前的配置是 crates 反代允许 20r/s 的频率访问,我猜测 cargo 可能没有限制并发数量导致超过了这个限制,并且相关的代码已经进入了稳定版。

@taoky
Copy link
Member

taoky commented May 26, 2022

移至 #294 讨论。

@taoky taoky closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants