简介
Homebrew
是一款包管理工具,目前支持macOS
和linux
系统。主要有四个部分组成: brew
、homebrew-core
、homebrew-cask
、homebrew-bottles
。
brew和brew cask的区别?
brew 装的主要是 command line tool。
brew cask装的大多是有gui界面的app以及驱动,brew cask是brew的一个官方源。
二者并无竞争关系,所以也不存在你说的更推荐brew cask。brew装的东西比较偏向开发,而brew cask装的东西会相对生活化一些。
官方解释
https://brew.sh
Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with macOS.
http://caskroom.github.io
Homebrew-Cask extends Homebrew and brings its elegance, simplicity, and speed to macOS applications and large binaries alike.
换源
参考镜像助手
更换为腾讯源
git -C "$(brew --repo)" remote set-url origin https://mirrors.cloud.tencent.com/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.cloud.tencent.com/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.cloud.tencent.com/homebrew/homebrew-cask.git
brew update
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.cloud.tencent.com/homebrew-bottles/bottles' >> ~/.zprofile
source ~/.zprofile