p-hueber/prefetcharr

Building not working

Closed this issue · 2 comments

Debian 12

root@server:/home/prefetcharr# ls
Cargo.lock  Cargo.toml  CHANGELOG.md  deny.toml  Dockerfile  README.md  src
root@tjaards-rundfunk:/home/prefetcharr# cargo install --lock --path .
error: unexpected argument '--lock' found

  tip: a similar argument exists: '--locked'

Usage: cargo install --locked [CRATE[@<VER>]]...

For more information, try '--help'.
root@server:/home/prefetcharr# cargo install --locked --path .
  Installing prefetcharr v0.3.0 (/home/prefetcharr)
    Updating crates.io index
  Downloaded serde_derive v1.0.195
  Downloaded thiserror-impl v1.0.56
  Downloaded thiserror v1.0.56
  Downloaded serde v1.0.195
  Downloaded memchr v2.7.1
  Downloaded serde_json v1.0.111
  Downloaded clap v4.4.13
  Downloaded clap_builder v4.4.12
  Downloaded syn v2.0.48
  Downloaded quote v1.0.35
  Downloaded proc-macro2 v1.0.76
  Downloaded anyhow v1.0.79
  Downloaded deranged v0.3.11
  Downloaded 13 crates (1017.2 KB) in 0.39s
   Compiling proc-macro2 v1.0.76
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.151
   Compiling once_cell v1.19.0
   Compiling cfg-if v1.0.0
error: linker `cc` not found
  |
  = note: No such file or directory (os error 2)

error: could not compile `proc-macro2` (build script) due to previous error
warning: build failed, waiting for other jobs to finish...
error: could not compile `libc` (build script) due to previous error
error: could not compile `libc` (build script) due to previous error
error: failed to compile `prefetcharr v0.3.0 (/home/prefetcharr)`, intermediate artifacts can be found at `/home/prefetcharr/target`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
root@tjaards-rundfunk:/home/prefetcharr# 

You need a C compiler. Try
sudo apt install build-essential

@Panda260 ah I just spotted the --lock vs --locked mistake. I will correct that, thanks!