I have been scouring my issue all over the internet and stack exchange but nothing that I have found works.

I am using Anchor to manage my Solana programs but keep getting the error:

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

I have updated Rust and set the default version bu using:

rustup default 1.69.0 or rustup default stable

rustup default

And get the output result:

1.69.0-x86_64-unknown-linux-gnu (default)

The current toml file is:

name = "mint-nft"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

crate-type = ["cdylib", "lib"]
name = "mint_nft"

no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

anchor-lang = "0.26.0"
anchor-spl = "0.26.0"
mpl-token-metadata = { version = "1.11.2", features = [ "no-entrypoint" ] }

I am at a loss why the compiler is saying that my version is 1.62.0-dev when the current version is 1.69.0.

I have tried variations of anchor versions up to 0.28.0 but to no avail.

Does anybody have an idea of how to go about this and get the program to compile? Note that I am running Debian 11 on bare metal (no VM).


2 Answers 2


This error is about your solana-cli version, not Anchor version.

You can update to 1.16.0 with solana-install init 1.16.0 and this will be fixed.

I have been scouring my issue all over the internet and stack exchange but nothing that I have found works.

This is the first place you'd see this error on the internet and the accepted answer explains why this error happens.

  • This was a major part of the solution as well as the next response below. Thank you! Commented Jun 15, 2023 at 5:29
  • Upgrade your rust version to the latest one

  • Upgrade your Solana CLI version to 1.16.0

  • Upgrade your Anchor CLI version to 0.28.0

  • Run cargo update -p solana-zk-token-sdk --precise 1.14.18

  • Run anchor build

  • The cargo update command helped after doing the answer above. Thank you, I was able to get my program compiled and working. Commented Jun 15, 2023 at 5:30
  • Very good! can you mark my answer as verified so that other developers can also get help when they meet the same issue. ;) Commented Jun 15, 2023 at 8:43

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.