macOS-使用brew的踩坑避坑

一、报错:Download failed: https://raw.githubusercontent.com/Homebrew/homebrew-core/...

原因就是访问不了的那个原因。

解决方案:

hosts文件中添加如下映射:

199.232.96.133 raw.githubusercontent.com

二、报错:curl: (60) SSL certificate problem: certificate has expired

More details here: https://curl.haxx.se/docs/sslcerts.html

原因:证书到期了

解决方案:重新下载证书

下载证书:

wget http://curl.haxx.se/ca/cacert.pem

替换系统证书:

# 备份旧证书
sudo mv /etc/ssl/cert.pem /etc/ssl/cert.pem.bak
# 替换新证书
sudo mv ~/Downloads/cacert.pem /etc/ssl/cert.pem

猜你喜欢

转载自blog.csdn.net/tirestay/article/details/132729161