安装arm版Homebrew

本文最后更新于:2023年6月19日 晚上

参考文献

  1. https://www.bilibili.com/read/cv14064572

实际安装

第一步:设置中科大源

1
HOMEBREW_CORE_GIT_REMOTE=https://mirrors.ustc.edu.cn/homebrew-core.git

第二步:安装

1
/bin/bash -c "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)"


第三步:添加配置文件

1
2
3
4
5
cd ~
touch .zshrc
open -e .zshrc
复制进去
export PATH=/opt/homebrew/bin:$PATH

最后更新一下配置文件:

1
source ~/.zshrc


大功告成。最后,brew update 就好

更换源

1
2
3
4
5
6
7
8
# 替换brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
# 替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
# 刷新源
brew update

碎碎念

https://blog.csdn.net/liaowenxiong/article/details/119008586
文章作者说 brew cask 已经集成到 brew 里面了,所以就不需要独立安装它了,但是!我安了之后还是显示 command not found,好迷啊。


本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!