Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NghiaTranUIT/4fa8083e48f7063c4a33972accb41204 to your computer and use it in GitHub Desktop.
Save NghiaTranUIT/4fa8083e48f7063c4a33972accb41204 to your computer and use it in GitHub Desktop.

The correct way, install homebrew on apple m1.

# We'll be installing Homebrew in the /opt directory.
cd /opt

# Create a directory for Homebrew. This requires root permissions.
sudo mkdir homebrew

# Make us the owner of the directory so that we no longer require root permissions.
sudo chown -R $(whoami) /opt/homebrew

# Download and unzip Homebrew. This command can be found at https://docs.brew.sh/Installation.
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

# Add the Homebrew bin directory to the PATH. If you don't use zsh, you'll need to do this yourself.
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc

pip3 install ds_store mac_alias

Download the Bitcoin code

# Download bitcoin/bitcoin on Github.
git clone https://github.com/bitcoin/bitcoin

# Switch to the bitcoin folder
cd bitcoin/

Compilation tool for apple m1

cd depends/
make
# After completing this step, you will see one more folder (arm-apple-darwin20.2.0) in /bitcoin/depends.
# Go back to bitcoin folder
cd ..

# Set up the compilation tool
./configure --prefix=$PWD/depends/arm-apple-darwin20.2.0

# https://github.com/bitcoin/bitcoin/tree/master/depends

# Start to compile bitcoin
make HOST=arm-apple-darwin20

make check

make deploy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment