Homebrew “Cannot install on ARM in Intel prefix”: use /opt/homebrew
Install a separate ARM Homebrew into /opt/homebrew and use each prefix for its own architecture.
On Apple Silicon, Homebrew belongs in /opt/homebrew — /usr/local is the Intel prefix and ARM bottles refuse it. Install a fresh ARM Homebrew from brew.sh into /opt/homebrew; you can keep the Intel one in /usr/local for Rosetta terminals if needed.
Try these fixes in order
Check the terminal architecture
Native ARM terminals report arm64; Rosetta terminals report i386. Know which one you are in.
archSee which brew is on PATH
See which brew the shell resolves; a native terminal should find /opt/homebrew/bin/brew.
which -a brewInstall ARM Homebrew
Run the installer from a native (non-Rosetta) terminal; it installs to /opt/homebrew on Apple Silicon.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"Point PATH at the ARM prefix
Add the ARM shellenv line and put /opt/homebrew/bin first on PATH, then verify.
brew --versionInterpret what you see
The error names /usr/local on an M1/M2/M3/M4 Mac
What it suggests: Apple Silicon's supported prefix is /opt/homebrew; the Intel prefix /usr/local is a Tier 3 configuration there and ARM bottles refuse it.
Next check: Install Homebrew fresh into /opt/homebrew from brew.sh.
You need some Intel-only formulae
What it suggests: Two prefixes can coexist: ARM brew in /opt/homebrew and Intel brew in /usr/local, the latter used from a Rosetta terminal.
Next check: Keep both, and check arch and which brew in each terminal.
which -a brew shows /usr/local/bin/brew first
What it suggests: The shell may be picking up the wrong brew first on PATH.
Next check: Put the ARM prefix's bin first in PATH for native terminals.
Why this happens
- An Intel-prefix Homebrew (/usr/local) was migrated or copied onto an Apple Silicon Mac.
- A terminal running under Rosetta installed Homebrew into the Intel prefix on an ARM Mac.
Still not working?
Do not force the install past this check with environment overrides; mixing ARM binaries into the Intel prefix produces broken bottles and mysterious build failures later. Keep one prefix per architecture.
Official sources
These steps are based on the linked documentation and general diagnostics. BugMedic has not independently tested every product and system configuration. Review commands before running them.