Mac OS X 安装 brew 工具!


最早的ports管理就是BSD那种,后来出现强大的Debian,弄了个dpkg+apt!

Mac OS X 最早使用比较多的工具是 MacPorts,但是现在来看这个工具有点老,不是很稳定,那我们推荐你安装 brew。

安装brew的命令如下:

sudo su
curl -L http://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C /usr/local


这样你的系统中就已经存在brew命令了,使用brew来安装一个rar解压工具unrar吧!方法如下:

sudo brew install unrar


如果想卸载也很简单:

sudo brew uninstall unrar


想查找看看brew是否能安装你想要的工具,拿lighttpd举例子,命令如下:

sudo brew search /lighttpd*/


如果安装了MacPorts就不能安装homebrew,必须先卸载MacPorts:

$ sudo port -f uninstall installed
$ sudo rm -rf
/opt/local
/Applications/DarwinPorts
/Applications/MacPorts
/Library/LaunchDaemons/org.macports.*
/Library/Receipts/DarwinPorts*.pkg
/Library/Receipts/MacPorts*.pkg
/Library/StartupItems/DarwinPortsStartup
/Library/Tcl/darwinports1.0
/Library/Tcl/macports1.0
~/.macports
原文地址:https://www.cnblogs.com/walter371/p/4091041.html