当我试图运行锚构建时,会出现以下错误:
error: target is not supported, for more information see: https://docs.rs/getrandom/#unsupported-targets
--> /Users/mac/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.1.16/src/lib.rs:267:9
|
267 | / compile_error!("\
268 | | target is not supported, for more information see: \
269 | | https://docs.rs/getrandom/#unsupported-targets\
270 | | ");
| |___________^
error[E0433]: failed to resolve: use of undeclared crate or module `imp`
--> /Users/mac/.cargo/registry/src/github.com-1ecc6299db9ec823/getrandom-0.1.16/src/lib.rs:292:5
|
292 | imp::getrandom_inner(dest)
| ^^^ use of undeclared crate or module `imp`
For more information about this error, try `rustc --explain E0433`.
error: could not compile `getrandom` due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: build failed环境:
solana-cli 1.8.13 (src:42c3fbc1;专长:1006352700)
rustup 1.24.3 (ce5817a94 2021-05-31)
rustc 1.61.0 (fe5b13d68 2022-05-18)
锚-cli 0.24.2
发布于 2022-06-17 15:00:27
看起来,您在锚项目中包含了一个依赖项,它使用的是在bpf上不可用的rng。通常,这是试图在链上程序中包含加密包的结果。
https://stackoverflow.com/questions/72556765
复制相似问题