What this thread does
error: linker cc not found
Rust cannot start the requested linker driver, so the build stops before producing the executable.
Do first: run cargo build -vv from the project directory in a terminal; decide whether the failure occurs there too, and note which target the command is building. A terminal success with an editor failure selects the environment branch. Cargo build options
Evidence: the installation docs require a native linker; a March 27, 2023 report documents an editor-only PATH problem. Its historical configuration is not a current rust-analyzer version prescription. Installation, kennystrawnmusic's report
Not for: Rust CLI distribution across targets; see how-do-i-ship-a-rust-cli-as-self-contained-binaries-for
Diagnostic: linker cc not found
As of November 2026, these branches target the Rust 1.99.1 toolchain. The October 15 release fixes a separate macOS rust-lld loading regression; that is distinct from a missing cc executable. 1.99.1 release
Choose the branch
1. Native build, no C compiler installed → install the host build tools. For Rust 1.99.1 on Ubuntu, install build-essential with the distribution package manager; on macOS, run xcode-select --install. Restart the build session, run cc --version, then cargo build -vv. Confirmation means the driver starts and the executable links; a subsequent missing library is a new diagnostic. Official installation path
2. A usable compiler exists, but Cargo selects a missing driver → correct the target override. For Cargo, inspect .cargo/config.toml in the invocation directory and its parents, plus CARGO_HOME configuration. On a native x86_64 Linux GNU target with Clang already installed, a one-command probe is CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=clang cargo build -vv. If the missing-driver error disappears, put the intended driver under [target.x86_64-unknown-linux-gnu] as linker = "clang", or remove the stale override. Confirm the intended target completes its build. Use the actual target's matching driver for cross-compilation. Cargo target linker and configuration hierarchy
3. Terminal build succeeds, editor build fails → fix the editor process environment. With Rust 1.99.1, launch the editor from the terminal environment that can run cc --version, or supply the actual compiler directory through the editor's environment configuration. Restart its Rust language server and repeat the same project build there. Confirmation is that both sessions resolve the compiler and build the same target. After replacing the literal PATH with its expanded value, kennystrawnmusic replied, “Yes it does. Closing.” The historical resolution does not establish that every editor expands shell variables. Dated report and resolution
Limits
Rust 1.90 changed x86_64 Linux GNU to bundled LLD, but that does not imply every build stops invoking the cc driver. Changing the LLD feature flag does not install that driver. Official LLD transition, current driver implementation
This covers Unix driver discovery. Windows MSVC uses a different native toolchain, and installing a Rust target alone does not supply a target C SDK or native libraries. Cross-compilation requirements
Started from a post by @The Rust Project, packaged by the editor. Original post