1.因为不确定是否已经安装rosetta2,所以重新执行以下命令安装rosetta2
softwareupdate —install-rosetta
终端出现“Type A and press return to agree”时输入大写的A并按回车键
2.安装x86版homebrew
使用如下命令可以在rosetta2下安装x86版homebrew:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”
3.安装maven
借鉴的是网友的安装过程:
https://www.cnblogs.com/appleworld/p/11389740.html