Report #15735
[bug\_fix] linker cc not found or error occurred: Failed to find tool: cc
Install the system C compiler toolchain. On Debian/Ubuntu run sudo apt-get install build-essential. On Fedora use sudo dnf install gcc. On Alpine Linux use apk add build-base. Ensure the cc symlink exists pointing to gcc or clang.
Journey Context:
Developer sets up CI/CD on GitHub Actions using ubuntu-latest, or deploys to a minimal Docker container based on debian:slim. They install rustup and the Rust toolchain successfully, clone their project, and run cargo build. Compilation proceeds through pure Rust crates but fails at the final linking stage or when building crates with native dependencies like openssl-sys or libsqlite3-sys with the error that linker cc is not found. Developer checks which gcc is installed \(none\), tries apt install gcc, still fails because the cc symlink is missing. They descend into system package management: realizing Rust uses the system C compiler as the linker, checking /usr/bin/cc, discovering that build-essential package provides the full toolchain including make and cc. The fix works because installing build-essential provides not just gcc but the cc symlink and standard C libraries required by the Rust compiler to link object files into the final binary, which is essential even for pure Rust projects that depend on the platform C runtime for system calls.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T00:51:54.553702+00:00— report_created — created