该篇文章引自如下,原版搬运,亲测有效好用
文章来源点此
Homebrew官网 http://brew.sh/index_zh-cn.html
Homebrew是神马
linux系统有个让人蛋疼的通病,软件包依赖,好在当前主流的两大发行版本都自带了解决方案,Red hat有yum,Ubuntu有apt-get
Homebrew简称brew,是Mac OSX上的软件包管理工具,能在Mac中方便的安装软件或者卸载软件,可以说Homebrew就是mac下的apt-get、yum神器
Homebrew安装
Homebrew的安装非常简单,打开终端复制、粘贴以下命令,回车,搞定(请放心使用,原汁原味的官方安装方法搬运)
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Homebrew使用
搜索软件:brew search 软件名,如brew search wget
安装软件:brew install 软件名,如brew install wget
卸载软件:brew remove 软件名,如brew remove wget
查看软件信息:brew info wget
更多的?自己去官网挖吧 http://brew.sh/index_zh-cn.html
或者在终端输入如下,也能查到用法
brew help
好久没用,更新不成功
https://blog.csdn.net/weichuang_1/article/details/48901535
(先卸载再重新安装)
卸载
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
安装
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- 安装时遇到问题
It appears Homebrew is already installed. If your intent is to reinstall you
should do the following before running this installer again:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
但是卸载Homebrew时,提示Failed to locate Homebrew!,但是执行$ brew update命令时,提示brew: command not found
解决办法:
先删除/usr/local下的.git与Cellar文件夹,然后安装Homebrew即可。