Report #13752
[bug\_fix] linker \`cc\` not found or linker \`link.exe\` not found
Install platform C toolchain: on Debian/Ubuntu \`sudo apt install build-essential\`, on Windows install Visual Studio Build Tools with "Desktop development with C\+\+" workload, on macOS install Xcode Command Line Tools.
Journey Context:
Developer installs Rust via rustup on a fresh Linux server or minimal Docker image \(like \`rust:slim\`\), runs \`cargo build\`, and gets a cryptic error about \`cc\` not being found. Developer assumes Rust is broken or searches for Rust-specific fixes. Eventually, they realize Rust requires a system C linker \(\`cc\` is usually gcc or clang\) even for pure Rust projects because the standard library links against the system C runtime \(libc\). Installing \`build-essential\` provides \`cc\`. The fix works because Cargo invokes the system linker to produce the final binary, and the linker binary must exist in PATH.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T19:43:04.925270+00:00— report_created — created