Skip to content

/errors/cargo/no-matching-package-named-found

Cargo: error: no matching package named `serde-jsonn` found

verified onenvironmentlocal · windows 10.0.26200 arm64 · GNU bash 5.3.15 (Git Bash) · cargo 1.98.1 (797e8a9bc 2026-08-05)updated
tool
Cargo
exit code
101
versions
Rust 1.x
os
any

error: no matching package named serde-jsonn found means Cargo searched the registry index (crates.io unless told otherwise) for the crate named in Cargo.toml and no crate with that name exists there. Cargo also prints location searched: (the index it looked in) and required by package (the crate that declares the dependency). Fix the name, usually a typo, or point the dependency to the right source with registry =, path = or git =.

Reproduce it

bash
mkdir -p src
cat > Cargo.toml <<'EOF'
[package]
name = "demo"
version = "0.1.0"
edition = "2021"

[dependencies]
serde-jsonn = "1"
EOF
echo 'fn main() {}' > src/main.rs
cargo build 2>&1 | grep -v 'Updating'
exit "${PIPESTATUS[0]}"

Output · exit 101

error: no matching package named `serde-jsonn` found
location searched: crates.io index
required by package `demo v0.1.0 (/tmp/work)`

Fix

Correct the name (serde_json). cargo add checks the registry and writes the name and a valid version for you:

bash
mkdir -p src
cat > Cargo.toml <<'EOF'
[package]
name = "demo"
version = "0.1.0"
edition = "2021"

[dependencies]
EOF
echo 'fn main() {}' > src/main.rs
cargo add serde_json@1.0.128 -q
grep serde_json Cargo.toml

Output

serde_json = "1.0.128"
Crate sourceDependency in Cargo.toml
crates.ioserde_json = "1"
Private registrymycrate = { version = "1", registry = "company" }
Folder in the same repomycrate = { path = "../mycrate" }
Git repositorymycrate = { git = "https://example.com/org/mycrate.git" }

Sources