I am on Mac(M1) Big Sur 11.4, Homebrew version 3.2, [email protected]
I try to run solanar-test-validator in their README , I install open ssl with homebrew then I linked the openssl
sudo ln -s /opt/homebrew/opt/[email protected]/lib/libcrypto.1.1.dylib /usr/local/opt/[email protected]/lib/
When I run solana validate, it occur error
You'll need to use rosetta, as outlined in the readme at https://github.com/solana-labs/solana#1-install-rustc-cargo-and-rustfmt
There isn't a native M1 build yet.
without Rosetta:
git clone https://github.com/solana-labs/solana.git
cd solana/validator
in solana/validator
echo '#!/usr/bin/env bash
here="$(dirname "$0")"
set -x
exec cargo build --release --manifest-path="$here"/Cargo.toml --bin solana-test-validator -- "$@"' > solana-test-validator
./solana-test-validator
cd ../target/release
in solana/target/release
./solana-test-validator
Since I was using this with the original installed solana tools, I added the path to my shell config (~/.zshrc or ~/.bash_profile on mac). Just make sure that you are able to find the binary or the symlink to it after typing $which solana-test-validator
What I added to my .zshrc:
export PATH="/Users/lain/git/solana/solana-src/target/release:$PATH"
of course, replace the user.
Source and full credit
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With