Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rust, OpenSSL, solana-test-validator library not loaded issue

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

enter image description here

like image 836
Thanh Nham Avatar asked Jul 04 '21 14:07

Thanh Nham


2 Answers

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.

like image 156
Chase Barker Avatar answered Oct 27 '22 15:10

Chase Barker


without Rosetta:

fetch

git clone https://github.com/solana-labs/solana.git

build

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

test

cd ../target/release

in solana/target/release

./solana-test-validator

link

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

like image 2
phaze Avatar answered Oct 27 '22 15:10

phaze