简体   繁体   English

使用 Homebrew M1 本机安装 MySQL 时出错

[英]Error with M1 Native Installation of MySQL with Homebrew

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.我刚刚获得了我的第一个带有 M1 芯片的 MacOS 系统,但在使用 Homebrew 安装本机 M1 版本的 MySQL 时遇到了问题。 I have my terminal configured without Rosetta and I'm using the command "brew install MySQL" but I get this error:我在没有 Rosetta 的情况下配置了我的终端,并且我正在使用命令“brew install MySQL”,但出现此错误:

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?也许我在某处搞砸了 brew 安装?

You installed Homebrew into the wrong place.您将 Homebrew 安装到了错误的位置。 On x86 Mac, Homebrew uses /usr/local .在 x86 Mac 上,Homebrew 使用/usr/local On M1 Mac, Homebrew uses /opt/homebrew .在 M1 Mac 上,Homebrew 使用/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

  1. Uninstall your current homebrew卸载您当前的自制软件
  2. Reinstall homebrew back correctly following the guide.按照指南正确重新安装自制软件。

你需要安装 mariadb 而不是 mysql

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM