mac安装brew
文章目录
官方安装地址:
/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
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论