Solana: Anchor build says “cannot be built because it requires rustc 1.75.0 or newer” I have rustc installed 1.82.0

Anchor verification question: Rustc version Disadvantage in the Docker environment

Summary

The latest edition has been reported by users who are trying to check their anchor accounts using the Team Check. The problem is that this team requires access to a working rust compiler, especially 1.75.0 versions or newer. However, the user has learned that they have installed Rustc in the previous version in their system, so that the program cannot be developed.

Problem

The anchor Approval team is used to confirm and verify the authenticity of the resulting anchor address. To use this command, it is necessary to ensure that the rust compiler is operating. The problem arises when trying to create an anchor-Verify program using a built-in Rust Compiler installed in the system.

Code

The “Anchor Confirmation” code is as follows:

`Rūdys

Use anchor_lang :: Prelude ::*;

#[program]

Pub fn anchor_verify (

_owner: ID,

Accounts: Accounts <'_>,

) -> result <()> {

// …

}

`

This code fragment shows the main structure of rust function. This defines anchor program with one Anchor_verify feature, which takes several parameters.

User Solution

One user reported that he was facing this problem trying to create and run the Inchor Virtify command:

`Bash

The anchor confirms 3MRKMMRZ6FM4TREEJBZCUGG7NXWVSYCJD83WZMAGQMQm8J

`

As part of this team, they encountered an error message indicating that their rust compiler is incompatible with the required version.

Solution

Solana: Anchor build says

To solve this problem, the user has implemented a newer version of Rust (1.82.0), allowing them to create and run an anchor check program, unrelated to compatibility issues:

`Bash

RUSTC 1.82.0 -o anchor -Verify -—Pedition = 2018

`

After installing the Rustc in the previous version (version 1.75.0), the user could not create and run the Anchor-Verify program, resulting in a failure with the team presented.

Conclusion

This permit emphasizes that it is important to ensure that a person has access to a functioning rust compiler when trying to check the anchor accounts using the “Anchor Check” command. Consumers can solve this problem by updating their Rust version to a compatible installation (eg 1.82.0).

Tags: