Homebrew 是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷。
一、Homebrew 安装与卸载
安装方式一(推荐):(使用 科大源 进行安装)
安装
/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)"
卸载
/bin/bash -c "$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/uninstall.sh)"
如果报错 Error: No similarly named formulae found.,则更换一下 homebrew-core 文件即可,如果 git clone 的方式慢,也可以直接打开链接进行下载,将下载的文件夹改成 homebrew-core 替换掉之前的 homebrew-core 文件即可。
cd /usr/local/Homebrew/Library/Taps/homebrew/
rm -rf homebrew-core
git clone https://github.com/Homebrew/homebrew-core.git