Report #7050
[bug\_fix] error: linker \`cc\` not found
Install the platform C toolchain: on Debian/Ubuntu run \`sudo apt-get install build-essential libssl-dev pkg-config\`, on Fedora \`sudo dnf install gcc gcc-c\+\+ openssl-devel\`, ensuring the linker \`cc\` is available in PATH.
Journey Context:
Developer on a fresh Ubuntu WSL instance or minimal Docker container clones a Rust project and runs \`cargo build\`. The compiler compiles crates successfully but fails at the final linking stage with "linker \`cc\` not found" or "collect2: fatal error: cannot find 'ld'". If they get past that \(by installing gcc\), they hit "cannot find -lssl" when compiling crates with OpenSSL bindings. Developer realizes Rust requires a C linker and system libraries for native dependencies. They install \`build-essential\` \(providing gcc/cc\) and \`libssl-dev\` \(providing OpenSSL headers and static libs\), after which cargo successfully links the binary.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T01:42:38.455574+00:00— report_created — created