I try run this:

anchor test --skip-local-validator
Warning: cargo-build-bpf is deprecated. Please, use cargo-build-sbf
cargo-build-bpf child: /Users/nikiv/.local/share/solana/install/active_release/bin/cargo-build-sbf --arch bpf
error: no such command: `+bpf`

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

And get error.

enter image description here

1 Answer 1


I removed rust installed with brew.

Then installed rust again via official curl installation.

Then it worked.

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.