Stack Exchange Network
Stack Exchange network consists of 181 Q&A communities including
Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Visit Stack Exchange
Solana Stack Exchange is a question and answer site for Solana software users and developers. It only takes a minute to sign up.
Sign up to join this community
Anybody can ask a question
The best answers are voted up and rise to the top
10 months ago
I've got error below when try to run "anchor build"
zsh 1096 (git)-[main]-% anchor build
BPF SDK: /Users/medici/.local/share/solana/install/releases/1.10.31/solana-release/bin/sdk/bpf
cargo-build-bpf child: rustup toolchain list -v
cargo-build-bpf child: cargo +bpf build --target bpfel-unknown-unknown --release
error: command failed: 'cargo': Bad CPU type in executable (os error 86)
solana-test-validator is OK
anchor init is OK
i use solana 1.10.31 and anchor 0.25.0 installed with avm on mac m1. not sure what cause the problem. anything else i need to do to get anchor build on M1? any ideas please?
Jul 23, 2022 at 9:23
13 3 3 bronze badges
The best would be if someone had specific insight on how to troubleshoot and let you build natively (I'd be interested as well), but I have faced this same issue on my M1, and had to fallback to using Rosetta.
This can be done through:
Edit: I tried several recent version of solana during the process, to no avail
Jul 23, 2022 at 15:07
660 2 2 silver badges 11 11 bronze badges
I am running Anchor on an M1 and not having any issues. I did not have to take any special steps due to running an M1. Your culprit is likely not hardware related.
Jul 23, 2022 at 13:27
378 1 1 silver badge 11 11 bronze badges
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our
Accept all cookies
Necessary cookies only