How to run substrate nodes on M1 mac
May 25, 2021
Hello everyone, there’s been a couple repos incompatible with the new M1 chip by apple, and the substrate nodes used be one of them. There’s been a couple of hacks but they seem to not work anymore. However, there’s a new way to get the nodes running on an M1!
here are the simple steps to get the substrate-node-template to run on an M1 chip:
- clone the repo
cd ~/.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-runtime-0.22.0/src/traphandlers.rs
- ctl-f to find and replace
__rip
with__pc
and it should work!
Another common issue is that librocksdb-sys is set to install version 6.11, which is incompatible with M1. upgrade the requirement to 6.17 to fix this issue.
Read here for the full issue and response
Have a good day!