Solana: error: not a directory on npm run build:program-rust command

810 views Asked by At

I am having an error compiling my solana program and here is the log -

> [email protected] build:program-rust
> cargo build-bpf --manifest-path=./src/program-rust/Cargo.toml --bpf-out-dir=dist/program

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

There are 1 answers

0
AudioBubble On BEST ANSWER

I had to clear cache of solana, to fix the issue, after which the solana cli downloaded required packages again.

for that I used this command in ubuntu 20.04 -

rm -rf ~/.cache/solana/*