E05: 安装 brew,以管理软件

2020-03-05  本文已影响0人  Feel君

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

https://mirrors.ustc.edu.cn/help/homebrew-bottles.html#id3

上一篇 下一篇

猜你喜欢

热点阅读