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

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

我在编译我的 solana 程序时遇到错误,这是日志 -

> helloworld@0.0.1 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'

我不得不清除 solana 的缓存来解决这个问题,之后 solana cli 再次下载了所需的包。

为此,我在 ubuntu 20.04 -

中使用了这个命令
rm -rf ~/.cache/solana/*