简体   繁体   中英

Error when compiling "example-helloworld" Solana Smart Contract

Whenever I try and compile the code from the example-helloworld this error pops up:

incog@Adams-MacBook-Air example-helloworld % npm run build:program-rust

> helloworld@0.0.1 build:program-rust
> cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program

BPF SDK: /Users/incog/.local/share/solana/install/releases/1.10.5/solana-release/bin/sdk/bpf
cargo-build-bpf child: rustup toolchain list -v
cargo-build-bpf child: rustup toolchain link bpf /Users/incog/.local/share/solana/install/releases/1.10.5/solana-release/bin/sdk/bpf/dependencies/bpf-tools/rust
error: not a directory: '/Users/incog/.local/share/solana/install/releases/1.10.5/solana-release/bin/sdk/bpf/dependencies/bpf-tools/rust/lib'

The command I run is npm run build:program-rust but that is the error that pops up whenever I run it. First time I ran it, a github file was installing but I soon quit the process before it could finish. What should I do to allow the program to run?

Did you check your packets versions, mine is as below and they work

% node --version
v16.14.2

% npm --version
8.5.0

% rustc --version
rustc 1.60.0 (7737e0b5c 2022-04-04)

% solana --version
solana-cli 1.9.15 (src:e0254200; feat:1070292356

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM