七叶笔记 » java编程 » Mac M1安装Homebrew的方法步骤

Mac M1安装Homebrew的方法步骤

问题2 :如果 brew install 出以下错误, 则安装时使用 arch -arm64 brew install 软件包名 进行安装

创建安装目录

Homebrew 安装脚本会将程序默认装至 /usr/local/Homebrew ,这是 Intel 芯片架构上的安装路径,M1芯片上则需要安装到 /opt/Homebrew/ 下。

下载 homebrew 包并解压至 /opt/homebrew 目录

如果下载慢,可以直接通过 https://github.com/Homebrew/brew/tarball/master 或本地下载,copy 到 /opt 目录下再将压缩包解压到 /opt/homebrew 目录

将路径增加到PATH环境变量中

修改源

其它镜像地址:

HomeBrew 官方镜像: brew: https://github.com/Homebrew/brew core: https://github.com/Homebrew/homebrew-core cask: https://github.com/Homebrew/homebrew-cask

清华大学镜像: brew: https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git core: https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git cask: https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git

中科大镜像: brew: https://mirrors.ustc.edu.cn/brew.git core: https://mirrors.ustc.edu.cn/homebrew-core.git cask: https://mirrors.ustc.edu.cn/homebrew-cask.git

终于可以进行下载软件了

到此这篇关于Mac M1安装Homebrew的方法步骤的文章就介绍到这了,更多相关M1安装Homebrew内容请搜索七叶笔记以前的文章或继续浏览下面的相关文章希望大家以后多多支持七叶笔记!

相关文章