美文网首页
pod install 失败的一种解决办法

pod install 失败的一种解决办法

作者: 高浩浩浩浩浩浩 | 来源:发表于2023-08-23 15:00 被阅读0次

在拉去Github 源上第三方框架有时候会提示如下错误:

SSL_ERROR_SYSCALL in connection to github.com:443 

比如TF Lite 相关的

[!] Error installing TensorFlowLiteSwift
[!] /usr/bin/git clone https://github.com/tensorflow/tensorflow.git         
/var/folders/0g/f7wvhrwj1dxg7m1p_rryw3q00000gn/T/d20211207-4474-weuazf --template= --single-branch --depth 1 --branch v2.7.0

Cloning into '/var/folders/0g/f7wvhrwj1dxg7m1p_rryw3q00000gn/T/d20211207-4474-weuazf'...
fatal: unable to access 'https://github.com/tensorflow/tensorflow.git/': LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 

这时候按照网上的教程,配置命令行代理:

export https_proxy=http://127.0.0.1:7890
http_proxy=http://127.0.0.1:7890
all_proxy=socks5://127.0.0.1:7890

或者是 github代理

git config --global http.proxy http://172.0.0.1:1080
git config --global https.proxy http://172.0.0.1:1080

仍然会提示443 超时问题或者是域名解析失败的问题时

这时候可以尝试指定DNS解析增加github.global.ssl.fastly.net和github.com的映射

  1. 获取Github相关网站的ip
    访问https://www.ipaddress.com,拉下来,找到页面中下方的“IP Address Tools – Quick Links”

  2. 分别输入github.global.ssl.fastly.net和github.com,查询ip地址

  3. 在hosts文件里添加:

    github

    199.232.69.194 github.global.ssl.fastly.net
    140.82.112.4 github.com

  4. 最后命令行输入:ipconfig /flushdns(更新DNS缓存)

本人用这个方法解决了TF Lite 下载失败的问题

相关文章

网友评论

      本文标题:pod install 失败的一种解决办法

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