1

When I run anchor build I get the error:

error: package solana-program v1.18.26 cannot be built because it requires rustc 1.75.0 or newer, while the currently active rustc version is 1.72.0-dev Either upgrade to rustc 1.75.0 or newer, or use cargo update -p [email protected] --precise ver where ver is the latest version of solana-program supporting rustc 1.72.0-dev

How can I tell anchor to use a later version of solana?

when I run rustc --version it prints: 1.79.0

1 Answer 1

1

Anchor uses the rust compiler that ships with your Solana tools version. You probably want to install a more recent Solana version like:

solana-install init 1.18.17

Solana-install is deprecated so if you are on a version beyond 1.18.20 or so you will probably use

agave install update

instead

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.