"Getting Started" produces an error

I'm trying to work my way through the Getting Started page at Getting started - Rust Programming Language

When I do the cargo build after adding the ferris-says dependency, I get:

    Updating crates.io index
error: failed to load source for a dependency on `ferris-says`

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 (7fbf19e9c58df99e14e79ab77a7ae2e6b4953c9d); class=Odb (9); code=NotFound (-3)

I'm using powershell on windows, if that's relevant.

best regards
cropotkin

Hmm, that's odd.
Would you be so kind as to try

  • cargo update

In the root of your project? Or, simply deleting the Cargo.lock file.

yes, I'll do it now

Yes, I tried cargo update, and I tried deleting the Cargo.lock file and I get exactly the same error messages.

I get the feeling this error occurs before it even looks at the lock file.

Thank you for your help last night.

I have now fixed the problem by deleting my ~/.cargo/registry folder and trying again

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.