简介

Homebrew是一款包管理工具,目前支持macOSlinux系统。主要有四个部分组成: brewhomebrew-corehomebrew-caskhomebrew-bottles
image.png

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.

换源

参考镜像助手
更换为腾讯源

  1. git -C "$(brew --repo)" remote set-url origin https://mirrors.cloud.tencent.com/homebrew/brew.git
  2. git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.cloud.tencent.com/homebrew/homebrew-core.git
  3. git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.cloud.tencent.com/homebrew/homebrew-cask.git
  4. brew update
  5. echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.cloud.tencent.com/homebrew-bottles/bottles' >> ~/.zprofile
  6. source ~/.zprofile

关于homebrew的安装教程

https://brew.idayer.com/