[Issue that I'm facing]
I'm trying to install anchor no to my Windows device through WSL command line. However, I'm getting this error and I'm not sure what I need to do. I was following the direction in the following YouTube video for installing tools for Solana development and I'm stuck on the Anchor installation part.
[Error]
error[E0635]: unknown feature `stdsimd`
--> /home/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.7.6/src/lib.rs:33:42
|
33 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
| ^^^^^^^
Compiling solana-frozen-abi v1.18.17
Compiling rayon v1.10.0
Compiling wasm-bindgen v0.2.92
Compiling arrayref v0.3.7
For more information about this error, try `rustc --explain E0635`.
error: could not compile `ahash` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `anchor-cli v0.30.1 (https://github.com/coral-xyz/anchor?tag=v0.30.1#e6d7dafe)`, intermediate artifacts can be found at `/tmp/cargo-installlJnWep`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Error: Failed to install 0.30.1, is it a valid version?
[Rust Version]
username@Username:~$ rustc --version
rustc 1.82.0-nightly (f8060d282 2024-07-30)
username@Username:~$ rustup update stable
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
stable-x86_64-unknown-linux-gnu unchanged - rustc 1.80.0 (051478957 2024-07-21)
info: checking for self-update
[Downgrading Rust using command: rustup install 1.76.0]
error[E0635]: unknown feature `stdsimd`
--> /home/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ahash-0.7.6/src/lib.rs:33:42
|
33 | #![cfg_attr(feature = "stdsimd", feature(stdsimd))]
| ^^^^^^^
Compiling rayon v1.10.0
Compiling solana-frozen-abi v1.18.17
For more information about this error, try `rustc --explain E0635`.
error: could not compile `ahash` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...
error: failed to compile `anchor-cli v0.30.1 (https://github.com/coral-xyz/anchor?tag=v0.30.1#e6d7dafe)`, intermediate artifacts can be found at `/tmp/cargo-installsKFHVV`.
To reuse those artifacts with a future compilation, set the environment variable `CARGO_TARGET_DIR` to that path.
Error: Failed to install 0.30.1, is it a valid version?
[YouTube Video]
https://www.youtube.com/watch?v=smbRujz_zNg&t=1305s
I tried using ChatGPT, but it keeps suggesting me to install DockerFile, which I'm not sure if that's correct. Does anyone know what to do in this situation?
Looks like stdsimd was removed in recent updates on late February 2024, You can work around this issue by installing an older version of Rust. From the release tags looks like version 1.76.0 is latest release with stdsimd. You can install it using command
rustup install 1.76.0