如何在 Macbook pro M1 安裝 Homebrew
使用 Homebrew 官網指令安裝:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
出現錯誤訊息:
Homebrew is not (yet) supported on ARM processors!
Rerun the Homebrew installer under Rosetta 2.
If you really know what you are doing and are prepared for a very broken
experience you can use another installation option for installing on ARM:
~https://docs.brew.sh/Installation~
使用以下方式進行安裝:
- 安裝 xcode
xcode-select --install
系統會跳視窗詢問是否安裝,點確定,安裝完成後進行下一步。 - 安裝 rosetta
softwareupdate —install-rosetta
- 安裝 Homebrew
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- 用 Homebrew 安裝其他以前可以 brew install 的 package
arch -x86_64 brew install <package>
比如說:安裝 git 就用
arch -x86_64 brew install git
資料來源:https://stackoverflow.com/questions/64882584/how-to-run-the-homebrew-installer-under-rosetta-2-on-m1-macbook