Skip to content

Install Homebrew on Mac M2 #4341

Mar 19, 2023 · 4 comments · 15 replies
Discussion options

You must be logged in to vote

Maybe someone with more experience can chime in here, but I found a bandaid solution that worked for me.

Opened up my first mac in a few years today and experienced the exact same thing with it not recognizing the git install from XCode, even though zsh was telling me git was installed.

Since the homebrew install script is a bash script, I opened a bash terminal and saw:

me@my-MBP ~ % bash
bash-3.2$ git
bash: /usr/local/bin/git: Bad CPU type in executable

A google search led me to this stackexchange post.

I then ran the following:

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

However, now…

Replies: 4 comments 15 replies

Comment options

You must be logged in to vote
11 replies
@AlexandreKang
Comment options

@gromgit
Comment options

@AlexandreKang
Comment options

@gromgit
Comment options

@AlexandreKang
Comment options

Comment options

You must be logged in to vote
4 replies
@Anto1368
Comment options

@AlexandreKang
Comment options

@gromgit
Comment options

@AlexandreKang
Comment options

Answer selected by AlexandreKang
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
7 participants