Since I started using anchor I have been facing this problem where whenever i use the anchor build command, then my IDE-terminal shows me this error Stating :
“error: package solana-program v1.18.20
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”
I used to delete my cargo.lock file and then wrote the command “cargo add solana-program@=1.17.0”
but this only fixes the problem temporarily, as soon as I add any new dependencies the version mismatch continues,Or even If I create a new anchor project this problem persists,Kindly help with your valueable suggestion as to what I should do ?
Aditya Sharma is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.