Rust errors / Build and Cargo
Rust build error · checked with Rust 1.99.0
error: no matching package named `foo` found
error: no matching package named `foo` found
What it meansThe crate name is not on crates.io (typo, wrong name, or a crate that was renamed), or you are offline with an empty index.
Why it happens
- A hyphen/underscore mix-up in the name (crates.io names are what is published; imports use underscores).
- A crate that only exists on GitHub or a private registry.
How to fix it
1. Search the right name
cargo search foo2. Use a git dependency
For crates not published on crates.io.
foo = { git = "https://github.com/owner/foo" }Other wordings of this error
no matching package named found, no matching package found, location searched: crates.io index
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
- error: package `foo v1.2.3` cannot be built because it requires rustc 1.80 or newer, while
- feature `edition2024` is required
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?