If you're just getting started with Solana development on a new M1 Mac, you might be pulling your hair out right now. Everything was going great as...
For further actions, you may consider blocking this person and/or reporting abuse
Hi Nick. Kudos for the good work. Just wanted to point out that while installing
arch -x86_64 brew install openssl@1.1
on the rosetta terminal, I got this brew error:I don't know why this wasn't experienced by anybody else. I am looking into this and would like to know if someone already solved it. 🤠
Finally! I resolved this issue. Now, I am able to start a localnet node in my Mac M1.
From this step where, you are stuck, just continue installing under ARM architecture. Then, follow my notes here. github.com/abhi3700/sol-playground...
You will be able to run on M1. I tested for Solana version 1.8.5.
Even I am facing this same issue.
Would like to hear from reply from others
I wasn't able to run ./scripts/cargo-install-all.sh .
According to this commit on Solana repo, I think you need to install
greadlink
first using the following commandat line 13 of cargo-install-all.sh
change this:
cargo="$("${readlink_cmd}" -f "${here}/../cargo")"
to this:
cargo="cargo"
then run
./scripts/cargo-install-all.sh .
It should work
For anyone who might encounter this, after editing the cargo-install-all.sh file I would get:
zsh: operation not permitted: ./scripts/cargo-install-all.sh
Apple apparently puts the file in quarantine, running
xattr -d com.apple.quarantine solved it !
anyway, do not use
git clone https://github.com/solana-labs/solana.git
Since it will download the current version of Solana, that right now (November, the 7th 2021), is the 1.9.0. Even if this version will build and install correctly on M1 macs, you'll have issues later when you try to send transactions to the Solana network.
Instead, download the 1.8.2 version and follow all the above steps.
I am at the point where I have to setup config file so Cargo knows how to compile Rust codes, I did not have a folder named config so I created that, then in that folder I created a file and named it rust code and pasted the given code in. and when I run cargo build I get an error saying it could not find cargo.toml
Am i doing something wrong?
ok so i figured it out, you do not make a folder, you just make the file and name it config. so that fixed that.
MacBook-Pro ~ % solana-test-validator
dyld[19265]: Library not loaded: /usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib
Referenced from: /Users/dige/.local/share/solana/install/releases/1.8.5/solana-release/bin/solana-test-validator
Reason: tried: '/usr/local/opt/openssl@1.1/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file)
zsh: abort solana-test-validator
Can't find a solution to this.
I am having a problem with the updating my path, I went to the .zshrc and added the given path and it when I do the last step to see if solana is working I get and error saying command not found. any help or ideas of what I may have done wrong?
I'm using bash but just did the following and it worked fine, should work if you fill in ~/.zshrc:
echo 'export PATH=$PWD/bin:$PATH' >> ~/.bash_profile
Thank you for taking the time and effort to do this. This was very helpful fixing validator errors after I got my new M1 mac. I did have to do some additional minor config edits, such as suggested by Luca Cervone in the discussion here... but your article got me 95% there. Thanks!
I tried to run the solana-test-validator and got message: Notice! No wallet available.
solana airdrop
localnet SOL after creating oneLedger location: test-ledger
Log: test-ledger/validator.log
⠁ Initializing... zsh: illegal hardware instruction solana-test-validator
Hi newbie in solana dev here, I got stuck at step "cargo build" (after compiling solana source code) receiving error: failed to run custom build command for
tikv-jemalloc-sys v0.4.2+5.2.1-patched.2
Here's my current rust and other dependencies version and using Mac M1 hardware.
I also tried to use sudo apt update but no avail. However on this site substrate.stackexchange.com/questi..., i found answer that suggesting to manually update to current version of tikv-jemalloc-sys, maybe this can be a solution but no knowledge on how to do that.
I am able to run solana-test-validator but when I open other terminal to execute solana commands it gives "-bash: solana: command not found". Could someone please help here?
Also if I close the terminal and start again, I have to do all the steps again.
Thanks for the tutorial. I would only change one step: install Rust with Homebrew.
Excellent post! low-key a life saver
THANK YOU!
Love this. Thank you SO much!
I can't thank you enough.
Many thanks, Nick!
it works, and now I have a validator successfully running on mac.
Thank you from Indonesia, you saved my day.
by the way, cmake is also necessary during the cargo build.