先安装Git,打开一个shell
cd /usr/local
sudo mkdir homebrew
curl -L https://github.com/mxcl/homebrew/tarball/master | sudo tar xz --strip 1 -C homebrew
cd homebrew/bin
./brew -v
file brew
cat brew | more
sudo ./brew update
如果“brew update”命令执行出错,请确保文件夹/usr/local的所有者权限是你本人而不是root:
sudo chown $USER /usr/localbrew updat
(如果~下没有文件".bash_profile" 请执行: touch '.bash_profile' )
vim '.bash_profile'加入
export PATH=$PATH:/usr/local/homebrew/bin
之后可以直接执行brew(不用./brew)
如果有了Git可以这样安装(未测试)
git clone https://github.com/mxcl/homebrew.git
cd homebrew/bin
cd homebrew/bin
./brew -v
安装测试
./brew install wget
./brew uninstall wget
本文详细介绍了在Mac OS系统下如何通过Homebrew工具安装软件的过程,包括安装Homebrew、更新软件包列表、安装及卸载软件的具体步骤,并提供了安装测试指令。适合Mac用户了解并掌握Homebrew的基本使用。
3002

被折叠的 条评论
为什么被折叠?



