Rust errors / Build and Cargo
Rust build error · checked with Rust 1.99.0
cannot be built because it requires rustc
error: package `foo v1.2.3` cannot be built because it requires rustc 1.80 or newer, while the currently active rustc version is 1.75.0
What it meansA dependency declares a minimum Rust version (rust-version) newer than the compiler you are running.
Why it happens
- Your toolchain is old (a distro package, or a pinned rust-toolchain file).
- A dependency raised its MSRV in a patch release.
How to fix it
1. Update Rust
rustup update stable2. Or pick an older dependency version
Cargo can choose versions that support your Rust: set rust-version and use resolver 3 (default on edition 2024).
cargo update -p foo --precise 1.2.03. Check what your code needs
Our Rust versions page tells you which release stabilized each API.
Other wordings of this error
cannot be built because it requires rustc, requires rustc 1., currently active rustc version is, rust-version
Other build errors
- error: linker `link.exe` not found
- error: linker `cc` not found
- error: failed to run custom build command for `openssl-sys`
- error: failed to select a version for the requirement
- error: failed to select a version for `libsqlite3-sys`... the package `libsqlite3-sys` lin
- error: could not compile `my-crate` (bin "my-crate") due to 1 previous error
- feature `edition2024` is required
- Blocking waiting for file lock on package cache
Up next
Find the right pagePaste any Rust errorCompiler codes and build errors in one finder.Read it next →Also worth your time
Did this answer your question?