问题描述:Mac运行brew install xxx 报错
报错信息:fatal: unable to access ‘https://github.com/Homebrew/homebrew-core/’: Failed to connect to github.com port 443: Operation timed out
原因分析:GitHub无法访问
解决方案:修改hosts文件
- 查询域名对应的dns
网站:http://tool.chinaz.com/dns?
输入域名查询出对应的dns,选择TTL值最小的一个 - 修改hosts文件
Mac打开访达->前往->前往文件夹->输入/etc