Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rustlings failed to install, linker 'cc' not found #2141

Open
LilacMonarch opened this issue Oct 22, 2024 · 0 comments
Open

Rustlings failed to install, linker 'cc' not found #2141

LilacMonarch opened this issue Oct 22, 2024 · 0 comments

Comments

@LilacMonarch
Copy link

Installing on WSL 2. Rustup installed fine with the default settings.

I tried the --locked argument too, nothing changed.

cargo install rustlings
    Updating crates.io index
  Installing rustlings v6.3.0
    Updating crates.io index
    Updating crates.io index
  Downloaded serde_spanned v0.6.7
  Downloaded proc-macro2 v1.0.86
  Downloaded unicode-ident v1.0.12
  Downloaded hashbrown v0.14.5
  Downloaded serde v1.0.209
  Downloaded toml_edit v0.22.20
  Downloaded serde_derive v1.0.209
  Downloaded indexmap v2.4.0
  Downloaded winnow v0.6.18
  Downloaded clap v4.5.16
  Downloaded syn v2.0.76
  Downloaded clap_builder v4.5.15
  Downloaded anyhow v1.0.86
  Downloaded once_cell v1.19.0
  Downloaded clap_derive v4.5.13
  Downloaded autocfg v1.3.0
  Downloaded rustix v0.38.35
  Downloaded libc v0.2.158
  Downloaded serde_json v1.0.127
  Downloaded 19 crates (2.6 MB) in 0.91s
   Compiling proc-macro2 v1.0.86
   Compiling unicode-ident v1.0.12
   Compiling libc v0.2.158
   Compiling serde v1.0.209
   Compiling cfg-if v1.0.0
   Compiling log v0.4.22
error: linker `cc` 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: failed to compile `rustlings v6.3.0`, intermediate artifacts can be found at `/tmp/cargo-installuIOaF3`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant