Mac下brew更换国内镜像源
作者:钓赛通
发布时间:2023-04-25
点击数:
镜像地址(推荐中科大镜像
中科大镜像:https://mirrors.ustc.edu.cn/brew.git 清华镜像:https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git GitHub镜像:https://github.com/Homebrew/brew.git
依次使用
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git brew update
在使用过最后brew update后,需要等待一部分时间,大概一分钟,如果看见终端上方一直在变化就离成功不远了,最后会在终端中显示更新信息,就算是大功告成了