Running Brew on the New Apple M1 Chip

March 22, 2021

On the new Macbook M1 chip, you might get an error such as “To install under x86_64, install Homebrew into /usr/local” - which will take you down many rabbit holes. This is an actual solution that fully works.

I used my GoogleFu and did not find a solution as simple as this:

5 Simple Steps to Install Intel Brew on M1

  1. Install Rosetta (this will fail if your Terminal is set to “Open using Rosetta”) by running softwareupdate --install-rose
  2. Run this command to install the Intel architecture Homebrew arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  3. Add this to your ZSH config (I recommend using OhMyZSH + add a file called ~/.oh-my-zsh/custom/brew.zsh) with the contents:
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
alias ibrew='arch -x86_64 /usr/local/bin/brew'
  1. Re-source your zsh term source .zshrc
  2. Run Intel brew as ibrew install <whatever>

That’s it! Now you can install brew for ARM and have ibrew for running Intel-specific apps under Rosetta. Super fast and simple solution!

If you run into trouble, try typing brew config and ibrew config to make sure that your brew installs are really in their respectively correct folders - just look for the line “HOMEBREW_PREFIX:”.

  • ARM brew will live in /opt/homebrew
  • Intel brew will live in /usr/local

Shoutout to Sam Soffes for his post on this topic that was helpful.


Let's keep the internet safe and free? →→ Click!