After running cargo build-bpf
I get the following error:
cargo-build-bpf child: rustup toolchain list -v
cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release
error: package 'anchor-lang v0.27.0' cannot be built because it requires rustc 1.60 or newer, while the currently active rustc version is 1.59.0-dev
Sanity checking my rust version with rustup -V
I get:
rustup 1.25.2 (2023-02-01)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active 'rustc' version is 'rustc 1.68.0 (2c8cc3432 2023-03-06)'
How can I update the rustc that Anchor sees?
rustup -V
from the same directory where is your anchor project? If you are within the project try to runrustup show
, that is similar to-V
just list all toolchain and informs ifdirectory override
or iftoolchain.toml
is not defined.