Error "linker 'cc' not found" in Rust on Debian under Windows 10: how to fix?
Hello! I'm starting to learn Rust and encountered a problem when trying to compile my first project. I have Windows 10, but I'm working in the Linux subsystem (WSL) with Debian. I installed Rust via rustup, everything went successfully. However, when I try to compile a simple program, I get an error.
Here's my code (main.rs file):
```rust
fn main() {
println!("Hello, world!");
}
```
I run `rustc main.rs` and get the following message:
```
error: linker `cc` not found
|
= note: No such file or directory (os error 2)
```
I googled it and understood that the problem is related to the missing linker. But I'm not sure what exactly needs to be installed and how to do it correctly. I tried `sudo apt install gcc`, but it didn't help — the error remains. Maybe I'm doing something wrong?