anchor build报错rustc 1.79.0-dev is not supported by the following package. 处理办法

报错如下:rustc1.79.0-devisnotsupportedbythefollowingpackage.Notethatthisistherustcversionthatshipswithsolanatoolsandnotyoursyste

报错如下 : rustc 1.79.0-dev is not supported by the following package. Note that this is the rustc version that ships with solana tools and not your system's rustc version. Use "solana-install update or hiover to https://docs.solanalabs.com/cli/install to install a newer version.bytemuck_derive@1.9.2 requires rustc 1.84Either upgrade rustc or select compatible dependency versions withcargo update <name>@kxcurrent-ver>--precise <compatible-ver>`where<compatible-ver>latest version supporting rustc 1.79.0-dev

是因为 bytemuck derive@1.9.2 这个依赖rust1.84版本,但目前所有的solana版本内置的rust最高版本是1.79, 所以需要 运行cargo update -p bytemuck_derive --precise 1.7.0 这个命令,来锁定依赖到 1.7.0,这样就可以了,或者 在Cargo.toml中 加入

[dependencies] anchor-lang = "0.30.1" bytemuck_derive = "=1.7.0" # 锁定到兼容 1.79 的版本

  • 原创
  • 学分: 0
  • 分类: Solana
  • 标签:
点赞 0
收藏 1
分享

0 条评论

请先 登录 后评论
franklin20222022
franklin20222022
江湖只有他的大名,没有他的介绍。