macOS M1安装HomeBrew
Homebrew是什么?
- Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷。
Homebrew的安装和使用
参考:https://blog.csdn.net/sinat_38184748/article/details/114115441
安装
开源安装脚本库:https://gitee.com/cunkai/HomebrewCN
复制以下内容到你的终端:
intel芯片:
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
M1芯片:
/bin/zsh -c "$(curl -fsSL https://gitee.com/huwei1024/HomebrewCN/raw/master/Homebrew.sh)"
回车运行,按照提示运行下去就可以了
验证
brew -v
rantichow@FrantiChowdeMac-mini sbin % brew -v
Homebrew >=2.5.0 (shallow or no git repository)
fatal: detected dubious ownership in repository at '/opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-core'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-core
Homebrew/homebrew-core (no Git repository)
fatal: detected dubious ownership in repository at '/opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-cask'
To add an exception for this directory, call:
git config --global --add safe.directory /opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-cask
Homebrew/homebrew-cask (no Git repository)
frantichow@FrantiChowdeMac-mini sbin %
标签:macOS,repository,--,Taps,M1,Homebrew,HomeBrew,homebrew
From: https://www.cnblogs.com/frantichow/p/17093101.html