How To Install Homebrew on Apple Silcon (M1) with Big Sur

Homebrew will not getting port to the ARM architecture anytime soon, as work on ARM has been running for many years (see the timeline here). But a lot of Formulae have alread been shown to work with the Rosetta 2 emulation on the M1 processors from Apple.

But how can I install homebrew on Apple Silicion? The command for installing homebrew is:

So let’s start a terminal window on Apple Silicon an and running this bash command … unfortunately you will get the following error message(s):

Homebrew is not (yet) supported on ARM processors!
Rerun the Homebrew installer under Rosetta 2.

Image for post
Image for post

In my particularly case I want to install postgres, which is a formula already categorized to work fine on Apple Silicon M1, but how can install homebrew with Apple Rosetta2?

The easy way

You can simply tell the bash which architecture to chose with the prefix:
arch -x86_64

But for those not familiar with the bash and who want to make more changes in the terminal, or even enforcing any other app to use the Intel pat in the universal binary, the following approach might be helpful.

Running a special flavor (Intel emulation, or ARM code) in a universal binary

If you have a universal binary on your macOS, running Apple Silicon (M1), Apple Terminal or the fantastic freeware replacement iTerm2 is straightforward.

You can decide which part of a universal binary will start, and whatever will run in this app will be executed under this “architecture”. This means that if you are starting a terminal with Rosetta2, all the typed in commands will be emulated with Rosetta too as well.

Go to Finder and chose the terminal.app

Image for post
Image for post

with a right-click select “Get Info”

Image for post
Image for post

Rosetta will most likely not be activated. By changing this setting the terminal.app will run in future under the Rosetta2 emulation.

Image for post
Image for post

When running now the above bash-command homebrew will run successfully. After the installation you can install formulae which are known to run fine on Apple Silicon (M1). In my case for instance postgres.

Once you are finished with the commands you want to run in this app under the emulation please take care to switch off the Rosetta2 emulation.

Image for post
Image for post

Written by

Managing director at teccompanion.com, physician, founder, developer and blogger.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store