Homebrew on Apple silicon

November 28, 2020

Homebrew is the popular package manager for Mac that aims to be a drop-in (ish) replacement for the Linux yum or apt-get package managers. Due to the new M1 being ARM instead of the more common x86_64 Homebrew does not yet officially support the architecture.

The two ways to install Homebrew

There are 2 ways to install Homebrew, either through the Rosetta 2 compatibility layeror natively installing Homebrew. Nearly all casks and bottles will be supported through Rosetta 2, but they will be marginally slower due to Rosetta’s JIT, I recommend this option if you just want to get started and install your favorite programs and command line tools.

To do this simply:

arch x86_64 bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

This will require sudo permissions!

Homebrew is currently in the process of ARM64 support, a lot of packages are broken, for example the JDK is broken right now as they have no CI infrastructure to test things on. Due to Go not having ARM64 support until February next year a lot of AWS tools such as aws do not work.

They also recommend installing Homebrew to /opt/homebrew.

So to install Homebrew natively (non root):

  1. Install Homebrew

     cd ~
     mkdir homebrew && curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
  2. Move Homebrew to a directory in $HOME.

     mkdir ~/.homebrew
     mv homebrew ~/.homebrew
  3. Run homebrew

     ./homebrew/bin/brew update
  4. Add Brew to your $PATH

     export PATH="/Users/{user}/.homebrew/homebrew/bin:$PATH"

After this you can test it out by installing a simple package like htop. If it works you’re all set, but if it doesn’t you’ll have to file an issue on the linked GitHub issue.

Back to top