1,543
社区成员
发帖
与我相关
我的任务
分享
curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh >> brew_install
sed -i ".bak" 's|BREW_REPO="https://github.com/Homebrew/brew"|BREW_REPO="http://mirrors.ustc.edu.cn/brew"|' ./brew_install
/bin/bash ./brew_install
# 这一步骤不是必须,如果之前已经安装brew成功的可以执行
cd "$(brew --repo)"
git remote set-url origin http://mirrors.ustc.edu.cn/brew.git
## 进入
cd "$(brew --repo)/Library/Taps/homebrew/"
rm -rf ./*
git clone http://mirrors.ustc.edu.cn/homebrew-core.git
git clone http://mirrors.ustc.edu.cn/homebrew-cask.git
brew update
# 更换镜像
echo 'export HOMEBREW_BOTTLE_DOMAIN=http://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
gradle -v
Welcome to Gradle 6.3!