问题
Updating crates.io index
warning: spurious network error (2 tries remaining): SSL error: syscall failure: Connection reset by peer; class=Os (2); code=Eof (-20)
warning: spurious network error (1 tries remaining): failed to connect to github.com: Resource temporarily unavailable; class=Os (2)
error: failed to get `rand` as a dependency of package `guessing_name v0.1.0 (/mnt/d/Linux/Desktop/Rust/guessing_name)`
Caused by:
failed to load source for dependency `rand`
Caused by:
Unable to update registry `crates-io`
Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`
Caused by:
failed to connect to github.com: Resource temporarily unavailable; class=Os (2)
解决:
删除掉 ~/.cargo/registry/index
;可能是这个目录损坏了