1.
2. 如何更新源
brew install 时会先执行 brew update, 即先更新下自己
该操作比较慢, 可通过修改代码源优化加速.
Homebrew 由 3 个部分组成:
- brew
- homebrew-core
- homebrew-cask
- homebrew-bottles 二进制预编译包
更新源
https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
|
cd "$(brew --repo)" git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core" git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-cask" git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.zshrc_osx
source ~/.zshrc
brew update
|
3. 手动安装
如果下载安装文件比较慢, 可以手动安装
4. 常用命令
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
| brew doctor
brew upgrade [software]
brew outdated
brew cleanup [software]
brew cleanup -n
brew info [software]
brew deps --installed --tree
|
5. 常用安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| brew install autojump brew install axel brew install bash brew install make grep gnu-sed gnu-tar gnu-time gnu-which gnu-indent gnu-units inetutils findutils ed coreutils brew install rar
brew cask install iterm2 brew cask install visual-studio-code brew cask install sogouinput brew cask install spectacle brew cask install alfred brew cask install docker brew cask install flux brew cask install google-chrome brew cask install intellij-idea brew cask install wechat
brew cask install atom brew cask install cheatsheet brew cask install dingtalk brew cask install edrawmax brew cask install foxmail brew cask install tunnelblick
brew cask install snipaste brew cask install yed
brew tap ringohub/redis-cli brew update && brew doctor brew install redis-cli
|