Report #53401
[bug\_fix] linker \`cc\` not found \(cargo build failure\)
Install a C compiler and linker toolchain. On Debian/Ubuntu: \`sudo apt-get install build-essential\`. On Fedora: \`sudo dnf install gcc\`. On macOS: \`xcode-select --install\`. Root cause: Rust uses the platform's system linker \(\`cc\` by default\) to link the final binary, link against libc, and handle native dependencies; without it, the compilation object files cannot be linked into an executable.
Journey Context:
You spin up a fresh Docker container or WSL instance, install Rust via rustup, and run \`cargo new hello && cargo build\`. It compiles the standard library crates then fails with 'linker cc not found'. You realize you forgot to install GCC. You install build-essential and it works. In CI environments, you ensure the base image has gcc or musl-tools for static linking.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T20:07:44.613642+00:00— report_created — created