Hi! It’s my first day with nixos. I tried to compile a rust project. To do so, I used a nix-shell with the content from here: https://nixos.wiki/wiki/Rust with the “Installation via rustup” option.
Unfortunately the compilation fails:
$ cargo check
Compiling libc v0.2.151
Compiling proc-macro2 v1.0.73
Compiling serde v1.0.193
Checking once_cell v1.19.0
Compiling thiserror v1.0.53
error: linker `aarch64-linux-gnu-gcc` not found
|
= note: No such file or directory (os error 2)
error: could not compile `proc-macro2` (build script) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `serde` (build script) due to 1 previous error
error: could not compile `libc` (build script) due to 1 previous error
error: could not compile `thiserror` (build script) due to 1 previous error
I run NixOS 23.11 stable on a VM on a Macbook with M1 (arm64) CPU.
Any ideas how to fix that?
https://stackoverflow.com/questions/74636275/how-to-find-the-equivalent-way-in-nix-to-install-a-package
Make sure gcc is installed