0

Hello and thanks for your help in advance!

I am having an issue building my project, here is the background:

Fedora Linux v.39 rustc 1.78.0 solana-cli 1.18.24 (src:6b04e881; feat:3241752014, client:Agave) avm 0.30.1 anchor-cli 0.30.1

Here is the backtrace and build error message....

solana-build-bpf --manifest-path=./programs/blocklockcore/Cargo.toml --bpf-out-dir=./target/deploy -bash: solana-build-bpf: command not found [root@Web BlockLockCore]# RUST_BACKTRACE=1 anchor build thread 'main' panicked at cli/src/lib.rs:545:18: called Option::unwrap() on a None value stack backtrace: 0: rust_begin_unwind 1: core::panicking::panic_fmt 2: core::panicking::panic 3: core::option::unwrap_failed 4: anchor_cli::override_toolchain::parse_version 5: anchor_cli::override_toolchain::override_solana_version 6: anchor::main note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace. anchor clean anchor build error: no such command: +solana

    Cargo does not handle `+toolchain` directives.
    Did you mean to invoke `cargo` through `rustup` instead?

Has anyone dealt with this error before:

"error: no such command: +solana"

Thanks again!

1 Answer 1

1

There was probably an issue adding Solana to the correct PATH when you installed it.

See https://stackoverflow.com/questions/71965007/solana-command-not-found-after-ubuntu-update-22-04-jammy

or

Solana CLI not updating PATH, new terminal window not recognizing Solana CLI

1
  • Hey thanks very much for your response. I tried that, here is the content of my file ~/.bashrc... "export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" export PATH=$PATH:$HOME/.cargo/bin . "$HOME/.cargo/env" export PATH=$PATH:$HOME/.cargo/bin export LD_LIBRARY_PATH=/usr/local/openssl-1.1/lib:$LD_LIBRARY_PATH export PATH="/root/.local/share/solana/install/active_release/bin:$PATH" " It seems to be an issue with how the toolchain is being specified in the project. I created a file "rust-toolchain" with the contents of "1.81.0" but I have the same error.
    – David
    Commented Sep 21 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.