Report #84023
[bug\_fix] linker 'cc' not found
Install a C compiler and linker toolchain: on Debian/Ubuntu run \`sudo apt install build-essential\`, on Fedora \`sudo dnf install gcc\`, on macOS install Xcode Command Line Tools with \`xcode-select --install\`, and ensure \`cc\` or \`gcc\` is in PATH.
Journey Context:
A developer sets up a fresh Ubuntu WSL instance or Docker container and installs Rust via rustup. They create a new project with \`cargo new test\_proj\` and run \`cargo run\`. Instead of compiling, they receive an error that the linker 'cc' is not found. The developer is confused because they assumed Rust was self-contained. They search the error and learn that although rustc compiles to LLVM IR, it relies on the system C linker \(traditionally invoked as \`cc\`\) to produce the final binary, and that the Rust standard library links against system C libraries. After installing \`build-essential\` \(which provides gcc and cc\), the project compiles successfully.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T23:37:35.952965+00:00— report_created — created