1

I am attempting to replicate code I found in a tutorial. I am using the following dependencies in my Cargo.toml file:

[dependencies]
iron = "0.5.1"
mime = "0.2.3"
router = "0.5.1"
urlencoded = "0.5.0"

I receive the following error message when I execute cargo run from the project's src directory:

Updating registry `https://github.com/rust-lang/crates.io-index`
An unknown error occurred

It hangs at "Updating registry" for roughly 15 minutes before the error appears. I would guess versioning as the issue, however the tutorial that I am using directly states that they included them as a way to avoid version mismatch with the example code.

I attempted to search for an answer but the error code is too vague to find anything.

The results of cargo run --verbose added:

Caused by:
  the given version requirement is invalid

I am now getting:

failed to parse registry's information for: serde_json

and

failed to parse registry's information for: serde

when I compile/run with cargo with my listed dependencies and with "*" as the version, respectively.

Shepmaster
  • 388,571
  • 95
  • 1,107
  • 1,366
David Kamer
  • 2,677
  • 2
  • 19
  • 29

0 Answers0