e-tipsmemo

ごった煮

Cargo build/update error "no match for id (some hash)"

Updating registry `https://github.com/rust-lang/crates.io-index`
error: failed to load source for a dependency on `image`

Caused by:
Unable to update registry `https://github.com/rust-lang/crates.io-index`

Caused by:
failed to fetch `https://github.com/rust-lang/crates.io-index`

Caused by:
object not found - no match for id (~~~~

Cargo buildを実行したらcrate.ioからフェッチできないと言われた。
色々と原因があるかもしれないのでなんとも言えないらしい?
ネットがつながっていても発生するのでそれによる問題ではない

解決方法

$ mv ~/.cargo/registry/ ~/.cargo/registry_
$ cargo build --verbose

ですべてをもう一度取得し直してビルドすることで解決することがある。