Email me

Rust errors / Build and Cargo

Rust build error · checked with Rust 1.99.0

error: failed to select a version for the requirement

error: failed to select a version for the requirement

What it meansCargo cannot find a version of a crate that satisfies every requirement in your dependency tree at once (or the version you asked for does not exist, or needs a newer Rust).

Why it happens

  • Two dependencies need incompatible versions of a crate that only allows one copy (links = "..." crates like openssl-sys or libsqlite3-sys).
  • A typo or a version that was never published (or was yanked).
  • Your rust-version (MSRV) excludes every matching version with the MSRV-aware resolver.
  • An old Cargo.lock with an offline or outdated index.

How to fix it

1. Read which crates pull it in

cargo tree -i <crate> --target all

2. Update the index and lock file

cargo update

3. Align the conflicting dependencies

Upgrade the dependency that needs the older version, or pin a compatible one.

cargo update -p <crate> --precise <version>

Other wordings of this error

failed to select a version for the requirement, failed to select a version for, candidate versions found which didn't match, versions that meet the requirements are

Other build errors

Up next

Find the right pagePaste any Rust errorCompiler codes and build errors in one finder.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ