Reputation: 2965
I tried to upgrade with Brew
$ brew upgrade stripe/stripe-cli/stripe
I got:
Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)!
To rerun under ARM use:
arch -arm64 brew install ...
To install under x86_64, install Homebrew into /usr/local.
AS suggested, I tried
$ arch -arm64 brew install
But got:
Error: Invalid usage: This command requires at least 1 formula or cask argument.
I tried installing Rosetta 2 according to this tutorial
$ /usr/sbin/softwareupdate --install-rosetta --agree-to-license
But I got:
Installing Rosetta 2 on this system is not supported.
Upvotes: 15
Views: 50091
Reputation: 5647
In my case, I switched Terminal to run with Rosetta 2 in the early days of Apple Silicon and forgot about it.
Switching it back got homebrew working again.
If this is the case for you, do this:
Upvotes: 9
Reputation: 143
This was happening to me in tmux since uname -a
was giving x86_64
, it should return arm64
on m1 macs.
I added this to my tmux.conf to make it always start in arm mode.
set -g default-command "arch -arch arm64 /bin/zsh"
Found this here: Running tmux on an M1 Mac in arm64 mode
Upvotes: 1
Reputation: 21
Well, all other answers seemed like a workaround for me, I would recommend to do this
cd /opt
sudo mkdir homebrew
sudo chown $(whoami):admin homebrew
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
Then just reload terminal and your brew install xxx
should work just fine.
Upvotes: 2
Reputation: 4922
Seems homebrew has to be used like this from now on:
arch -arm64 brew upgrade
Upvotes: 32
Reputation: 2965
I added the original argument to arch -arm64 brew upgrade
and it worked
$ arch -arm64 brew upgrade stripe/stripe-cli/stripe
Upvotes: 9