macOS M1 一键安装Homebrew脚本
2022-04-11 本文已影响0人
shellblock
安装Homebrew
如果你的Mac已经安装非原生M1版本的Homebrew,一样可以使用本脚本。脚本会提示需删除旧的Homebrew并备份数据至桌面。
Gitee项目地址: https://gitee.com/cunkai/HomebrewCN
完整版安装脚本:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

极速安装脚本(精简版 几秒钟安装完成):
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh
安装好Homebrew后,执行以下命令刷新系统配置
source /Users/ericli/.zprofile
接着就可以通过以下命令查看Homebrew的版本了
brew -v

注意:如果没有执行source /Users/ericli/.zprofile
命令,则会看到是旧的Homebrew版本

卸载brew
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"
© 2019-2022 Shellblock.