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
- Install Rosetta (this will fail if your Terminal is set to “Open using Rosetta”) by running
- 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)"
- Add this to your ZSH config (I recommend using OhMyZSH + add a file called ~/.oh-my-zsh/custom/brew.zsh) with the contents:
alias ibrew='arch -x86_64 /usr/local/bin/brew'
- Re-source your zsh term
- 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.