赞
踩
步骤1
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
若提示:
则可以执行,卸载原先到brew: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)"
此步骤会删除原先通过brew安装的命令
再执行步骤1,提示Install Success信息
步骤2 在终端上输入brew 测试是否安装成功,结果显示:
-brew: command not found
原因是brew默认安装在/usr/local/bin下,但是该路径没有添加到系统环境变量中,解决办法如下:
打开~/.bashrc 文件,在末尾添加如下:
export PATH=/usr/local/bin:$PATH
保存退出后执行如下语句让配置生效:
source .bashrc
如果遇到修改文件失败,一般.bashrc是只读模式,修改下文件读写权限:
chmod -R 775 .bashrc
然后就可以用brew进行安装其他软件了
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。