valpackett / systemstat

Rust library for getting system information | also on https://codeberg.org/valpackett/systemstat
https://crates.io/crates/systemstat
The Unlicense
610 stars 71 forks source link

error: linker `cc` not found #81

Closed bingryan closed 3 years ago

bingryan commented 3 years ago

hello, when I build this crate or cargo run example I will get that error

➜  systemstat git:(master) cargo build --release
   Compiling autocfg v1.0.1
   Compiling bitflags v1.2.1
   Compiling radium v0.5.3
   Compiling ryu v1.0.5
   Compiling libc v0.2.82
   Compiling version_check v0.9.2
   Compiling lexical-core v0.7.4
   Compiling memchr v2.3.4
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: could not compile `lexical-core`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: build failed
➜  systemstat git:(master) uname -a
Linux ubuntu 5.8.0-40-generic #45~20.04.1-Ubuntu SMP Fri Jan 15 11:35:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
bingryan commented 3 years ago
➜  systemstat git:(master) cargo run --example info
   Compiling libc v0.2.82
   Compiling ryu v1.0.5
   Compiling radium v0.5.3
   Compiling bitflags v1.2.1
   Compiling memchr v2.3.4
   Compiling lexical-core v0.7.4
   Compiling lazy_static v1.4.0
   Compiling bytesize v1.0.1
   Compiling num-traits v0.2.14
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: could not compile `lexical-core`

To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: aborting due to previous error

error: build failed
bingryan commented 3 years ago

os version

➜  systemstat git:(master) uname -a
Linux ubuntu 5.8.0-40-generic #45~20.04.1-Ubuntu SMP Fri Jan 15 11:35:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
bingryan commented 3 years ago

solved it

sudo apt install gcc