1、基本介绍:
- Homebrew也称brew[bru:],MacOS下基于命令行的最强大软件包管理工具,使用Ruby语言开发。类似于CentOS的yum或者Ubuntu的apt-get,拥有安装、卸载、更新、查看、搜索软件等很多实用的功能。
- 简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷。
- Homebrew可以安装在MacOS中不包含的UNIX工具,换句话说就是MacOS缺失的软件包的管理器。
2、安装:
2.1、下载:
(1)Homebrew依赖于Xcode Command Line Tools,所以会自动先安装Xcode Command Line Tools,也可以用命令手动安装:xcode-select --install
,或者去苹果网站手动下载安装:https://developer.apple.com/download/more/
(2)在终端中输入以下命令安装Homebrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2.2、卸载:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
2.3、更新Homebrew:
brew update