美文网首页
解决安装homebrew时候的443错误

解决安装homebrew时候的443错误

作者: 生信编程日常 | 来源:发表于2020-12-23 14:32 被阅读0次

在MacOS中homebrew是个非常方便靠谱的工具,但是安装的时候有时候会遇到443错误。

按照官方的安装方法,运行如下代码:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" 

或者

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

有时候会返回以下错误:

curl: (35) OpenSSL SSL_connect: Connection reset by peer in connection to raw.githubusercontent.com:443

查了一下,参考https://zhuanlan.zhihu.com/p/137025155,修改host文件:

sudo vi /etc/hosts

在最后加入:

199.232.4.133 raw.githubusercontent.com

然后运行安装链接即可。

如果在安装的过程中报如下错误:
# Error of “error: could not lock config file .git/config: Permission denied” occurs while installing Carthage

这是因为homebrew文件夹权限不够问题,可以:

sudo chmod 774  /usr/local/Homebrew/

或者参考https://stackoverflow.com/questions/49282002/error-of-error-could-not-lock-config-file-git-config-permission-denied-occu中的帖子回答。

相关文章

网友评论

      本文标题:解决安装homebrew时候的443错误

      本文链接:https://www.haomeiwen.com/subject/dadsnktx.html