2

I was trying to install homebrew git but I got this Error: Cannot install on Intel processor in ARM default prefix (/opt/homebrew)!

I have an Intel processor MacBook Air (13-inch, Early 2015) running macOS Monterey 12.6.5

To install brew - the first step seemed OK:

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

I then want to install a different git with brew install git and that's when the error happens. What might I do to understand / fix this?

2
  • What is the result of type brew; /usr/bin/uname -m?
    – nohillside
    Commented Apr 13, 2023 at 16:12
  • it is brew is /opt/homebrew/bin/brew x86_64
    – jjl
    Commented Apr 13, 2023 at 23:06

1 Answer 1

1

For whatever reason your homebrew installation ended up in the wrong directory. To fix, do the following

  • sudo rm -r /opt/homebrew
  • Quit (Cmd-Q) Terminal and restart it
  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

After the installation, run type brew again. If it returns /usr/local/bin/brew, you are all set.

1
  • It works! Thanks a lot for helping : )
    – jjl
    Commented Apr 14, 2023 at 7:07

You must log in to answer this question.

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