美文网首页
Cocopods 遇到error: Failed to open

Cocopods 遇到error: Failed to open

作者: Bepawbikvy | 来源:发表于2019-12-25 11:19 被阅读0次

最近使用Cocopods添加第三方时,遇到以下报错

error: Failed to open TCP connection to raw.githubusercontent.com:443 (Connection refused - connect(2) for "raw.githubusercontent.com" port 443)

意思就是:错误 :无法打开到raw.githubusercontent.com:443的TCP连接(连接被拒绝-“ raw.githubusercontent.com”端口443的connect(2))

报错信息图.png

不要慌~

1、首先前往文件夹,/private/etc 的目录下,找到hosts文件; /private/etc 的目录图.png 2、然后把hosts文件copy一份到桌面,打开,删除包括 githubusercontent的行,保存关闭,然后把桌面这个改过的文件拖到原来的文件夹里,替换原来的 1577242491717.jpg

3、最后重新输入pod update 或者 pod install就不会出现那种问题了。

相关文章

网友评论

      本文标题:Cocopods 遇到error: Failed to open

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