linuxbrew: https://docs.brew.sh/Homebrew-on-Linux
方法一
$ sudo apt install linuxbrew-wrapper
安装后
$ brew doctor
以上方法,比较慢
方法二
# 下载脚本
$ wget https://raw.githubusercontent.com/Homebrew/install/master/install.sh -O brew_install.sh
# 替换 BREW_REPO
$ vi brew_install.sh
BREW_REPO="https://mirrors.aliyun.com/homebrew/brew.git"
# 执行脚本
$ ./brew_install.sh
# 替换brew.git:
$ cd "$(brew --repo)"
$ git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替换homebrew-core.git:
$ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
$ git remote set-url origin https://mirrors.aliyun.com/homebrew/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
# 替换homebrew-bottles:
$ echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.zshrc
$ source ~/.zshrc
网友评论