I had this weird cargo error while trying to publish a new Mailchecker rust crate version and could not find anything on Google about.
Updating registry `https://github.com/rust-lang/crates.io-index`
error: failed 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:
invalid pack file - invalid packfile type in header; class=Odb (9)
I removed the local registry copy and it worked:
rm -rf ~/.cargo/registry