我正在尝试使用 anchor build
构建 (https://github.com/betterclever/solend-anchor) 包,但是出现了以下错误。
error: package `uint v0.9.3` cannot be built because it requires rustc 1.56.1 or newer, while the currently active rustc version is 1.56.0-dev
我更新了 rustc ,运行命令 rustup default nightly
后出现以下信息:
info: using existing install for 'nightly-x86_64-apple-darwin'
info: default toolchain set to 'nightly-x86_64-apple-darwin'
nightly-x86_64-apple-darwin unchanged - rustc 1.61.0-nightly
这里显示已安装和正在使用的 rustc 版本为 1.61,然而 Anchor Build 却无法找到它。我尝试运行 cargo build-bpf,但出现了相同的问题。cargo build
看起来正常工作。
运行 anchor build 和 cargo build-bpf 出现问题的原因是什么呢?