{"id":299,"hash":"b9642a98fab9ec1b4cb173e5775432d46548dff977191c9bee5c908b432d9332","pattern":"How do I fix the Rust error &quot;linker &#39;cc&#39; not found&quot; for Debian on Windows 10?","full_message":"I'm running Debian on Windows 10 (Windows Subsystem for Linux) and installed Rust using the command:\n\ncurl https://sh.rustup.rs -sSf | sh\n\nThere were no errors in the install, but when I tried to compile with rustc I got the error linker 'cc' not found.","ecosystem":"cargo","package_name":"linux","package_version":null,"solution":"The Linux Rust installer doesn't check for a compiler toolchain, but seems to assume that you've already got a C linker installed! The best solution is to install the tried-and-true gcc toolchain.\n\nsudo apt install build-essential\n\nIf you need to target another architecture, install the appropriate toolchain and target the compilation as follows:\n\nrustc --target=my_target_architecture -C linker=target_toolchain_linker my_rustfile.rs","confidence":0.95,"source":"stackoverflow","source_url":"https://stackoverflow.com/questions/52445961/how-do-i-fix-the-rust-error-linker-cc-not-found-for-debian-on-windows-10","votes":325,"created_at":"2026-04-19T04:41:47.321780+00:00","updated_at":"2026-04-19T04:52:27.230129+00:00"}