在拉去Github 源上第三方框架有時(shí)候會提示如下錯(cuò)誤:
SSL_ERROR_SYSCALL in connection to github.com:443
比如TF Lite 相關(guān)的
[!] 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
這時(shí)候按照網(wǎng)上的教程齿尽,配置命令行代理:
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 超時(shí)問題或者是域名解析失敗的問題時(shí)
這時(shí)候可以嘗試指定DNS解析增加github.global.ssl.fastly.net和github.com的映射
獲取Github相關(guān)網(wǎng)站的ip
訪問https://www.ipaddress.com崔泵,拉下來秘通,找到頁面中下方的“IP Address Tools – Quick Links”分別輸入github.global.ssl.fastly.net和github.com甸鸟,查詢ip地址
-
在hosts文件里添加:
github
199.232.69.194 github.global.ssl.fastly.net
140.82.112.4 github.com 最后命令行輸入:ipconfig /flushdns(更新DNS緩存)
本人用這個(gè)方法解決了TF Lite 下載失敗的問題