Reputation: 130
I just got my first MacOS system with an M1 chip and I'm having trouble installing the native M1 version of MySQL using Homebrew. I have my terminal configured without Rosetta and I'm using the command "brew install MySQL" but I get this error:
ritvikbiswas@Ritviks-MacBook-Pro ~ % brew install mysql
Error: Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!
Please create a new installation in /opt/homebrew using one of the
"Alternative Installs" from:
https://docs.brew.sh/Installation
You can migrate your previously installed formula list with:
brew bundle dump
ritvikbiswas@Ritviks-MacBook-Pro ~ %
Could anyone help me figure out why I'm getting this error? Maybe I messed up the brew installation somewhere?
Upvotes: 1
Views: 9403
Reputation: 4017
First, uninstall (if you have wrongly installed it).
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
Install:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After successful installation, you can get this message in terminal
echo '# Set PATH, MANPATH, etc., for Homebrew.' >> /Users/userName/.zprofile echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/userName/.zprofile eval "$(/opt/homebrew/bin/brew shellenv)"
Then set the homebrew to the right path
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.zshrc
Upvotes: 7
Reputation: 27568
You installed Homebrew into the wrong place. On x86 Mac, Homebrew uses /usr/local
. On M1 Mac, Homebrew uses /opt/homebrew
. I don't know where you copied and pasted the installation script. You obviously made a wrong installation.
Please go the official installation guide page. And
Upvotes: 5