the.blaggy
the.blaggy

Reputation: 885

What's the proposed way to switch to native Homebrew on M1 MacBooks?

I've used Homebrew via Rosetta the last couple of months. And now since the native version was released I'm not sure what the required steps are to switch.

Should I just update Homebrew and will the packages be updated automatically? Or do we have to reinstall them?

Thank you for your suggestions.

Upvotes: 4

Views: 1051

Answers (1)

Ortomala Lokni
Ortomala Lokni

Reputation: 62456

You can install both Homebrew for Apple M1 and Homebrew for Intel.

To install Homebrew for Apple M1

Open a terminal that is not using Rosetta 2. For this, right click on the Terminal application and verify that "open with rosetta" is disabled. Run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

To install Homebrew for Intel

Open a terminal with "open with rosetta" enabled and run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then you can add an alias in your ~/.zshrc:

alias ibrew='arch -x86_64 /usr/local/Homebrew/bin/brew'

To install a formula xyz on Apple M1 run:

brew install xyz

If for some reasons, it doesn't work on Apple M1, you can then install the Intel version with:

ibrew install xyz

Thanks to Dominik Stötter for its original article: TIP | The BEST way to install Homebrew (Brew) on Apple Silicon (M1)

Upvotes: 4

Related Questions