Closed jackzhp closed 1 year ago
It's hard to say why it specifically needs it. Usually that happens when Cargo.toml
is modified, such as adding a new dependency, or changing a version requirement. Another possibility is running cargo update
.
It may not need to download base64
specifically. The error comes from updating the index so that Cargo can determine which versions are available.
There are a few options for you:
--offline
flag, which will avoid downloading updates.~/.cargo/registry/index
and try again. We recently had an issue that was causing problems with updating the index.net.git-fetch-with-cli
option to use the git CLI for fetching the index, which should be more efficient and have fewer issues. ehuss has provides a couple of options to deal with slow or offline use of Cargo. I am going to close this as this seems to be a usage question. If it turns out a bug in Cargo, please create a minimal, complete, and verifiable example]mcve, and we can look into it. Thank you!
Problem
I am on a slow connection, I had successfully build the project. then a few days later. when I want to rebuild it, I got:
error: failed to get
base64
as a dependency of packagegrin_wallet_api v5.2.0-alpha.1 (/data3/soft/mimblewimble/2022/grin-wallet/api)
Caused by: failed to load source for dependencybase64
Caused by: Unable to update registrycrates-io
Caused by: failed to fetchhttps://github.com/rust-lang/crates.io-index
In fact, under ~/.cargo/....., I have many copies of base64 already: base64-0.11.0.crate base64-0.13.0.crate base64-0.12.3.crate base64-0.9.3.crate
and I am using 0.12.3, why do I have to download base64 again?
Proposed Solution
I hope when I rebuild the project, we don't have to download anything.
Notes
No response