I want to install and run two versions of Homebrew simultaneously on an Apple Silicon Mac: an ARM64 version, and an Intel version running under Rosetta 2.
I know I can prepend any brew command with arch --x86_64
to emulate Intel for that command, but this can lead to conflicts for formulas whose dependencies you already have built for ARM64. For example:
Error: gnupg dependencies not built for the x86_64 CPU architecture:
pkg-config was built for arm64
gettext was built for arm64
readline was built for arm64
openssl@1.1 was built for arm64
How can I install and run two separate, isolated versions of Homebrew (one for native ARM64 and one for emulated Intel), keeping each of their installed formulae and dependencies separate?