3

I am following the official Homebrew installation guide correctly and running:

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

According to the guide:

This script installs Homebrew to its preferred prefix (/usr/local for macOS Intel, /opt/homebrew for Apple Silicon and /home/linuxbrew/.linuxbrew for Linux) so that you don’t need sudo when you brew install. It is a careful script; it can be run even if you have stuff installed in the preferred prefix already. It tells you exactly what it will do before it does it too. You have to confirm everything it will do before it starts.

I am running on Monterey:

enter image description here

However, this is not the case for me, as it is disregarding the fact that I am running Apple Silicon M1 chip and is trying to install Homebrew into the Intel prefix! Terminal output:

~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/bin
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/sbin
/usr/local/share
/usr/local/var
/usr/local/opt
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew
/usr/local/var/homebrew/linked
/usr/local/Cellar
/usr/local/Caskroom
/usr/local/Frameworks

Press RETURN to continue or any other key to abort:

Why does the installer not attempt or prompt me to install Homebrew into the /opt/homebrew/ folder? What must I do? Every guide and question I can find online seems to suggest that it should do this automatically anyway. Grateful for any help!

0

2 Answers 2

6

I just ran into this. Go into your applications, right mouse click your terminal app, click "Get Info", and uncheck the "Open using Rosetta" option.

enter image description here

Then fully close your terminal, open it again, and reinstall.

3
  • 2
    Thanks for turning the comment into an answer!
    – nohillside
    Jun 3, 2022 at 14:13
  • 1
    Cheers from one Alec to another!
    – ajmedway
    Jun 6, 2022 at 16:24
  • 1
    This was already unchecked for me, but the installer still wants to install into /usr/local. Any other ideas?
    – oKtosiTe
    Aug 16, 2022 at 13:54
1

Another possibility is that the shell you're using is an Intel version installed with the old version of Homebrew, e.g. /usr/local/bin/bash. Switch to /bin/bash and reinstall.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .