令人哇塞的酷鸡 发布的文章

建议更换为华科大的镜像源

#更新Homebrew
cd "$(brew --repo)" && git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
#更新Homebrew-core
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" && git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
#更新Homebrew-cask(很多更新完国内源依然卡就是没更新这个)
cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask && git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git

最后设置你命令行的环境变量HOMEBREW_BOTTLE_DOMAIN(很重要)

  • zsh用户

    在~/.zshrc加入如下语句(该文件若有设过HOMEBREW_BOTTLE_DOMAIN,删掉即可)
    `export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/`
    `source ~/.zshrc` #(使刚更改生效)
  • bash

    打开~/.bash_profile加入如下语句(该文件若有设过HOMEBREW_BOTTLE_DOMAIN,删掉即可)
    `export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/`
    `source ~/.bash_profile` #(使刚更改生效)
    

最后试下更新brew
brew update --verbose#verbose能看到更具体的更新过程

排名编程语言Ratings同比上月
1Python12.90%+0.69%
2C11.80%-4.69%
3Java10.12%-2.41%
4C++7.73%+0.82%
5C#6.40%+2.21%
6Visual Basic5.40%+1.48%
7JavaScript2.30%-0.06%
8Assembly language2.25%+0.91%
9SQL1.79%+0.26%
10Swift1.76%+0.54%
11R1.58%-0.01%
12PHP1.50%-0.62%
13Classic Visual Basic1.27%+0.56%
14Groovy1.23%-0.30%
15Ruby1.16%-0.01%
16Delphi/Object Pascal1.14%+0.27%
17Fortran1.04%+0.59%
18Perl0.96%-0.24%
19Go0.95%-0.19%
20MATLAB0.92%-0.18%