Homebrew官网 http://brew.sh/index_zh-cn.html
Homebrew是神马
Linux系统有个让人蛋疼的通病,软件包依赖,好在当前主流的两大发行版本都自带了解决方案,Red hat有yum,Ubuntu有apt-get
神马,你用mac os,不好意Mac os木有类似的东东,泪奔中几经折腾总算找到了第三方支持:Homebrew,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使用
Homebrew使用没啥好说的了,常用的
搜索软件:brew search 软件名,如brew search wget
安装软件:brew install 软件名,如brew install wget
JovedeMacBook-Pro:~ jove$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Homebrew
/usr/local/Frameworks
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/opt
/usr/local/sbin
/usr/local/share
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var
Press RETURN to continue or any other key to abort
卸载homebrew方法:
1.打开终端,使用下面的卸载脚本: ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"
2. 检查以下目录,是否存在原先安装,但是现在不需要的软件包
/usr/local
/usr/local/bin
/usr/local/include
/usr/local/lib
/usr/local/sbin
/usr/local/share
3. 修复步骤2中目录的权限:
sudo chown root:wheel <directory> ; sudo chmod 755 <directory>