Fix `linker `cc` not found` Rust error on Ubuntu

April 18, 2022  ‐ 1 min read

rustup, the Rust installer, lets you easily install Rust on your system without too much hassle. And it does it very well. However, you might still see an error popping up when you run the rustup command. One of which might be: linker 'cc' not found.

The Rust installer for Linux(this includes WSL) doesn't check whether you have the necessary compiler dependencies installed. If you are new to this than your safest bet is probably to go for the gcc toolchain (gcc: GNU Compiler Collection).

Using apt, for Ubuntu and Debian, you can install gcc by installing the build-essential package:

$ apt install build-essential