Open viruscamp opened 2 years ago
This error comes from cargo
directly. Can you mv ~/.cargo/registry/rsproxy.cn-* ~/.cargo/registry/rsproxy.cn.old
and, run cargo install zupsko
(should fail) then cargo install-update bat
again?
This error comes from
cargo
directly. Can youmv ~/.cargo/registry/rsproxy.cn-* ~/.cargo/registry/rsproxy.cn.old
and, runcargo install zupsko
(should fail) thencargo install-update bat
again?
Did you mean ~/.cargo/registry/index/rsproxy.cn-*
? I do so and it doesn't work with the same report.
In fact, following the troubleshooting https://github.com/nabijaczleweli/cargo-update#source-replacement-vs-custom-registries may resolve this, at least it works for me :)
Try to add
[registries.rsproxy]
index = "https://rsproxy.cn/crates.io-index"
to your config.toml.
I think I found the cause: in %CARGO_HOME%\.crates.toml
[v1]
"cargo-expand 1.0.74 (registry+https://rsproxy.cn/crates.io-index)" = ["cargo-expand.exe"]
"irust 1.71.14 (registry+https://github.com/rust-lang/crates.io-index)" = ["irust.exe"]
When I ran cargo install-update --all
, cargo-expand
had been updated, but it got a failure on irust
.
It should be:
cargo install irust
without change %CARGO_HOME%\config.toml
edit %CARGO_HOME%\config.toml
to use rsproxy
cargo install cargo-expand
cargo install-update --all
, it use the info in %CARGO_HOME%\.crates.toml
, but it won't update https://github.com/rust-lang/crates.io-index
cargo install-update
reporterror: no index found for registry
but
cargo install
success.That is my cargo\config