I'm trying to build using anchor but there seems to be this error

error: package `constant_time_eq v0.3.0` cannot be built because it requires rustc 1.66.0 or newer, while the currently active rustc version is 1.62.0-dev

This is my current dependencies in cargo.toml file.

anchor-lang = { version = "0.27.0", features = ["init-if-needed"] }
anchor-spl = { git = "https://github.com/coral-xyz/anchor" }
bytemuck = "1.13.1"
toml_datetime = "=0.6.1"
constant_time_eq = "0.3.0"
winnow = "=0.4.1"
solana-program = "=1.14.17"

solana-cli version is 1.14.20. rustc version 1.70.0 anchor-cli version is 0.27.0

I also have tried to

4 Answers 4


Copying from the post you've linked:

The error message is misleading because the error actually results from the version of rustc that ships with solana and not your system's rustc version

The main problem is that the latest release of solana(1.14.17) is using an outdated version of rustc. This means MSRV problems like this one will go away once a new Solana release is published.

Solana 1.16 release uses a newer version of rustc, you can upgrade to solve your problem by running:

solana-install init 1.16.0

There is also no need for the extra dependencies in Cargo.toml after the upgrade:

anchor-lang = { version = "0.28.0", features = ["init-if-needed"] }
anchor-spl = "0.28.0"
  • Solana cli version upgrade to the 1.16 is working. Seems like your analysis for the solana release rustc version is correct. It works even I didn't update the anchor-lang version to 0.28 Great thanks, @acheron
    – AlexDragon
    Commented Jul 9, 2023 at 2:45
  • So I can upgrade to 1.16, but then I wont be able to test as Invoked an instruction with data that is too large. is there a middle ground? Commented Jul 28, 2023 at 13:23

Yes, after upgrading the version of Solana, the anchor build is working But in testing, there is an error.

'Program CAyJyJA5aKy62Uiq7JTRpnpRXdniGzVoeq7Qsamo1Kf8 invoke [1]',
    'Program log: Instruction: Initialize',
    'Program CAyJyJA5aKy62Uiq7JTRpnpRXdniGzVoeq7Qsamo1Kf8 consumed 8489 of 200000 compute units',
    'Program failed to complete: Instruction passed to inner instruction is too large (12884933804 > 1280)',
    'Program CAyJyJA5aKy62Uiq7JTRpnpRXdniGzVoeq7Qsamo1Kf8 failed: Program failed to complete'
  • Did you find a fix? Commented Jul 28, 2023 at 13:23
  • @Oura, getting the same issue? did you find any solution? Commented Aug 2, 2023 at 8:54

For anyone trying to use anchor 0.26 with solana 1.14 and encountering this error. Try updating Anchor.toml with the following:

anchor-lang = "0.26.0"
blake3 = "=1.3.1"

I was able to find a fix by installing Solana's latest release:

solana-install init 1.16.6 

And also anchor's latest version:

avm install 0.28.0
  • So i was able to find a fix by installing solana's latest release solana-install init 1.16.6 and also anchor's latest version avm install 0.28.0
    – tanim0la
    Commented Jul 30, 2023 at 8:34

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.