{{ ideas/thoughts/coding }}

{{ ideas/thoughts/coding }}

Building Solana from source on Apple M1

Running a fully featured single node cluster on your machine

Mannan Shah's photo
Mannan Shah

Published on Oct 1, 2021

2 min read

This guide address the issues I faced creating a local cluster on my development machine of Solana blockchain. If you have not heard about it till now, it's a decentralized blockchain enabling quicker transaction and scalable user friendly apps. Solana scores in terms of speed generating blocks in milliseconds and low cost of transactions for both developers/users.

I cloned this repo to start understanding application development on Solana
Solana Hello World, it's a simple application where the client will send the hello and get back numbers of times hello has been sent. I followed the guide, ran into a issue with this command.

$ solana-test-validator

test validator.png

With some digging into the issue, it got quite clear it had to do something with Apple M1 so it was suggested to build solana from the source. I followed instruction given here https://docs.solana.com/cli/install-solana-cli-tools#build-from-source

While trying to build from source, I ran into issue of command not found, more importantly greadlink

source.png

If you are getting similar error than you need to install coreutils, to do that run the command below.

$ brew install coreutils

Than follow process again to build from source, and voila command works this time solana-test-validator

solana test validator.png

I have local cluster running of solana blockchain, greatly enables me develop and test application in more controlled environment. For details on solana-test-validator you can check this link https://docs.solana.com/developing/test-validator

This guide assumes you have homebrew and rosetta install on your M1 machine, if you need to install that you can follow along this guide

Install Homebrew using Rosetta

Thank you.

References:

 
Share this