Anshuman
Anshuman

Reputation: 45

cargo version 2021 required on Solana anchor build

I am trying to run anchor build and am receiving the following response:

BPF SDK: /root/.local/share/solana/install/releases/1.8.0/solana-release/bin/sdk/bpf
Running: rustup toolchain list -v
Running: cargo +bpf build --target bpfel-unknown-unknown --release
error: failed to download `solana-frozen-abi v1.9.4`

Caused by:
  unable to get packages from source

Caused by:
  failed to parse manifest at `/root/.cargo/registry/src/github.com-1ecc6299db9ec823/solana-frozen-abi-1.9.4/Cargo.toml`

Caused by:
  feature `edition2021` is required

  consider adding `cargo-features = ["edition2021"]` to the manifest

PS: I have already tried suggestions at: Unable to specify `edition2021` in order to use unstable packages in Rust

Upvotes: 1

Views: 1811

Answers (2)

Johhn
Johhn

Reputation: 1049

At times, also consider downloading to like in my case I had to change from 2021 in my Cargo.toml file to 2018 and this has worked

Upvotes: 0

Jacob Creech
Jacob Creech

Reputation: 2107

It looks like your solana install is quite out of date. I would install either 1.8.11 or just run solana-install update

Upvotes: 5

Related Questions