Homebrew install error : "Bad CPU type in executable" - Monterey 12.4 #3385
-
I have : This is the error when I try to install Homebrew on macOS Terminal (zsh)
Any suggestions on how to fix this ? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 15 replies
-
Where did |
Beta Was this translation helpful? Give feedback.
-
My trainer gave me this link : https://sourceforge.net/projects/git-osx-installer/ git version
|
Beta Was this translation helpful? Give feedback.
-
For me, my /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)" And then I was able to successfully run the official installation command. |
Beta Was this translation helpful? Give feedback.
-
I have macOS Ventura (13.2.1) MacBook Pro M2 trying to install Homebrew and I am getting error like this: ==> This script will install: Press RETURN/ENTER to continue or any other key to abort: please give a suggestion for this |
Beta Was this translation helpful? Give feedback.
-
Maybe you need to reinstall git somehow
…On Mon, Mar 6, 2023 at 1:26 AM sunil3gs98 ***@***.***> wrote:
I have macOS Ventura (13.2.1) MacBook Pro M2 trying to install Homebrew
and I am getting error like this:
% /bin/bash -c "$(curl -fsSL
https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew
Press RETURN/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R sunil3gs98:admin /opt/homebrew
==> Downloading and installing Homebrew...
/bin/bash: line 234: /usr/local/bin/git: Bad CPU type in executable
Failed during: /usr/local/bin/git -c init.defaultBranch=master init --quiet
please give a suggestion for this
—
Reply to this email directly, view it on GitHub
<#3385 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABGL62BP4ZFPDEMQHTXGE6DW2V7PVANCNFSM5Z32642Q>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
sudo rm -f /usr/local/bin/git - This worked for me. |
Beta Was this translation helpful? Give feedback.
-
If someone, as in my case, had installed homebrew on the device with an Apple chip, and then switched to an Intel chip, this removes it by searching for the correct paths: https://raw.githubusercontent.com/nobady90/homebrew_unistall_from_chip_apple/main/uninstall.sh |
Beta Was this translation helpful? Give feedback.
Where did
/usr/local/bin/git
come from? Is that from an old installation of Homebrew that you migrated from an Intel Mac?