4

I have Ubuntu 22.04 and I am trying to test some sample codebases. When I use

anchor build 

I get the error below. I checked rustc and the 1.67 version is installed and I checked yarn which appears valid. Solana 1.9.5 installed.

error: package anchor-attribute-state v0.26.0 cannot be built because it requires rustc 1.59 or newer, while the currently active rustc version is 1.56.0-dev ubuntu@ip-10-0-1-126:~/solana/mycalculatordapp$ rustc --version rustc 1.67.0 (fc594f156 2023-01-24)

1 Answer 1

1

The Solana CLI tools come bundled with a rustc compiler that can be used for on-chain programs. Since you're on 1.9.5, you have a much older version of the bundled Rust compiler.

Please upgrade to something newer, at least the version targeted by Anchor 0.26.0, which is 1.13.5, by running:

$ solana-install init 1.13.5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.