官网装置地址:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
遇到上面提醒,阐明因为域名被谐和了,无法访问官网脚本地址:
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out
咱们只须要配置一下 hosts
文件即可
- 在 https://www.ipaddress.com/ 查问 raw.githubusercontent.com 的实在 IP
- 配置 hosts:199.232.68.133raw.githubusercontent.com,如果不晓得怎么配,请参考 github 拜访太慢,怎么办??
应用了中科大镜像来减速拜访:
/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