Homebrew是Mac下的一个包管理工具,类似yum之类的
Homebrew安装成功后,会自动创建目录/usr/local/Cellar 来存放Homebrew安装的程序,并在 /usr/local/bin 中创建符号链接.
安装方法一:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
我在这里遇到问题:
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused
主要因为某些?你懂的 因素 ,导致GitHub的raw.githubusercontent.com 域名解析被污染了。
解决方案:
1.在https://www.ipaddress.com/查询raw.githubusercontent.com的真实IP。
2.修改hots
sudo vim /etc/hosts
域名真实IP raw.githubusercontent.com
我查到最新的域名有4个IP地址,随便用了一个,发现又报错
Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in
Bash. Please migrate to the following command:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
然后试了试之前人用的IP地址:199.232.28.133 raw.githubusercontent.com
发现还是报错
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to raw.githubusercontent.com:443
算了。。。。只能用方法2了
安装方法二:
国内下载源脚本
zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
|