2021-12-07 pod install 常见报错解决

1.SSL_ERROR_SYSCALL in connection to github.com:443 报错

[!] 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 

解决方案:
如果键入github.com:443后进入的Github不是当前git config --global -l里当前账号的仓库,那就退出登录。如果出现的是Github的登录界面,那就登录Github。

a123@123deMacBook-Pro ios % pod install
Analyzing dependencies
Downloading dependencies
Installing TensorFlowLiteC 2.6.0 (was 0.0.1-nightly.20201122)
Installing TensorFlowLiteSwift 2.6.0 (was 0.0.1-nightly.20201122)
Generating Pods project
Integrating client project
Pod installation complete! There are 2 dependencies from the Podfile and 3 total pods installed.
a123@123deMacBook-Pro ios % 

2.Failed to connect to github.com port 443: Operation timed out

a123@123deMacBook-Pro ios % pod install
Analyzing dependencies
Downloading dependencies
Installing TensorFlowLiteC 2.6.0 (was 0.0.1-nightly.20201122)
Installing TensorFlowLiteSwift 2.6.0 (was 0.0.1-nightly.20201122)

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

Cloning into '/var/folders/0g/f7wvhrwj1dxg7m1p_rryw3q00000gn/T/d20211207-4427-qk3men'...
fatal: unable to access 'https://github.com/tensorflow/tensorflow.git/': Failed to connect to github.com port 443: Operation timed out

增加github.global.ssl.fastly.net和github.com的映射
获取Github相关网站的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缓存)

你可能感兴趣的:(2021-12-07 pod install 常见报错解决)