example-helloworld: solana-test-validator Library not loaded error
m1 chip macOS 11.3.1 node version v14.16.1
when start solana-test-validator
dyld: Library not loaded: /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib
Referenced from: /Users/123/.local/share/solana/install/active_release/bin/solana-test-validator
Reason: image not found
zsh: abort solana-test-validator
google searched this thread: https://stackoverflow.com/questions/59006602/dyld-library-not-loaded-usr-local-opt-openssl-lib-libssl-1-0-0-dylib
but can’t switch openssl vserion
Error: Unknown command: switch
tried different node versions tried reinstall xcode and brew with no luck
which openssl
/usr/bin/openssl
cd /usr/local/opt/openssl@1.1
cd: no such file or directory: /usr/local/opt/openssl@1.1
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 6
- Comments: 34 (3 by maintainers)
I get that this is an M1 problem, but literally anyone doing default install is going to be presented with this issue. I’m not sure why this is being closed.
Further, Rosetta was always designed to be a work around/temporary. Rosetta isn’t even supported in all regions - https://9to5mac.com/2021/03/02/apple-may-disable-rosetta-2-on-m1-macs-in-some-regions-macos-11-3-code-suggests/
I get that this is not the top priority, but it makes it quite difficult to support the Solana ecosystem.
@Mihail-Madzharov
You can try with this guide of
jasofromdiscord(https://discord.com/channels/428295358100013066/517163444747894795/884262811260289054):Someone needs to start working on full M1 compatibility, Apple is only making those from now on. It makes no sense to rely on Roseta today unless it is a temporary workaround (no one confirmed it is the case).
I can confirm this error on Mac M1. Even after linking the right library the message I get is
Referenced from: /Users/mohitkumar/.local/share/solana/install/active_release/bin/solana-test-validator Reason: no suitable image found. Did find: /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib: mach-o, but wrong architecture /opt/homebrew/Cellar/openssl@1.1/1.1.1k/lib/libssl.1.1.dylib: mach-o, but wrong architectureIt looks like M1 is not supported right now. can you guys put instructions on how to compile for M1 ?
You can set your config URL to https://api.devnet.solana.com
solana config set --url https://api.devnet.solana.com@jstarry Not sure why you closed this issue. A valid solution was not provided and it seems this will become evermore problematic as Apple will only be producing laptops with M1 chips.
Good article on Rosetta workaround: https://dev.to/nickgarfield/how-to-install-solana-dev-tools-on-an-m1-mac-kfn
The macos release binaries are not suitable for M1 silicon in any configuration as they are built for x86_64 arch with AVX and AVX2 extensions available. Building them from scratch under Rosetta is the workaround for now. See https://github.com/solana-labs/solana/blob/master/README.md#building