error: Linker`cc` not found when trying to compile file . rs

Asked

Viewed 28 times

0

I am trying to compile a file. Rust via vscode terminal, and I get this error:

causticroot@install:~/learning-rust/Book exercises/Hello world> rustc hello_world.rs 
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

My version of Rust and the position:

rustc 1.46.0 (04488afe3 2020-08-24)
cargo 1.46.0 (149022b1d 2020-07-17)

System: Opensuse Leap 15.2 - kde/plasma

  • That one cc that is missing is the C Compiler. Do you have any C compiler installed like GCC or CLANG?

  • I have the build-essential installed, which in the case of my distro is installed so: sudo zypper in cmake

1 answer

0


I managed to solve by installing : sudo zypper in cmake sudo zypper in gcc

Browser other questions tagged

You are not signed in. Login or sign up in order to post.