Homebrew默认安装脚本:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
在终端输入后,等待一段时间无响应,百度了N个解决方案,就下面这种解决方案比较好,使用中科大镜像来加速访问:
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
安装过程中的问题
如果命令执行中卡在下面信息:
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
请Control + C中断脚本,然后执行如下命令:
cd "$(brew --repo)/Library/Taps/"
mkdir homebrew && cd homebrew
git clone git://mirrors.ustc.edu.cn/homebrew-core.git
cask 同样也有安装失败或者卡住的问题,解决方法也是一样:
cd "$(brew --repo)/Library/Taps/"
cd homebrew
git clone https://mirrors.ustc.edu.cn/homebrew-cask.git
成功执行之后继续执行前文的安装命令:
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
最后看到==> Installation successful!就说明安装成功了。
网友评论