切换brew源

2022-07-18 13:55:33

切换brew源

中科大源

# 替换brew.git:cd"$(brew --repo)"git remote set-url origin https://mirrors.ustc.edu.cn/brew.git# 替换homebrew-core.git:cd"$(brew --repo)/Library/Taps/homebrew/homebrew-core"git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git# 替换homebrew-cask.git:cd"$(brew --repo)/Library/Taps/homebrew/homebrew-cask"git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git# 应用生效
brew update# 替换homebrew-bottles:echo'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles'>> ~/.bash_profilesource ~/.bash_profile

切换回官方的

# 替换brew.git:cd"$(brew --repo)"git remote set-url origin https://github.com/Homebrew/brew.git# 替换homebrew-core.git:cd"$(brew --repo)/Library/Taps/homebrew/homebrew-core"git remote set-url origin https://github.com/Homebrew/homebrew-core.git# 替换homebrew-cask.git:cd"$(brew --repo)/Library/Taps/homebrew/homebrew-cask"git remote set-url origin https://github.com/Homebrew/homebrew-cask.git# 应用生效
brew update# 删除.bash_profile变量vim  ~/.bash_profile# 删除如下变量# export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles# 执行更新source ~/.bash_profile

切换成阿里源

cd"$(brew --repo)"git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.gitcd"$(brew --repo)/Library/Taps/homebrew/homebrew-core"git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.gitecho'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles'>> ~/.bash_profilesource ~/.bash_profile

原文作者:陌雨翎
原文链接: https://www.cnblogs.com/rianley/p/13637378.html

  • 作者:姜小衰
  • 原文链接:https://jianglei.blog.csdn.net/article/details/119489411
    更新时间:2022-07-18 13:55:33