im build a project using anchor and wheen i use anchor build
it gives error
package `solana-program v1.18.8` 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 solana-program@1.18.8 --precise ver
where `ver` is the latest version of `solana-program` supporting rustc 1.72.0-dev
but the rustc v is 1.77.0
and solana-cli 1.18.1
and i don't know why and when i use cargo-build-sbf --version
it shows
solana-cargo-build-sbf 1.18.1
platform-tools v1.39
rustc 1.72.0
i have also updated rustup toolchain
but again can't be done
can anyone please help me
and when i try to install cargo install solana-cargo-build-sbf --force
but it gives
Updating crates.io index
error: could not find `solana-cargo-build-sbf` in registry `crates-io` with version `=1.19.0
I encountered the same issue today, it worked fine 2/3 days ago.
Downgrading to an older version did the trick I was able to build and deploy on devnet:
cargo update -p solana-program@1.18.8 --precise 1.18.1