问题说明
ios工程,在使用"pod install"安装依赖的时候,由于超时总是报错
$ pod install
...
Installing hermes-engine (0.71.11)
[!] Error installing hermes-engine
[!] /usr/bin/curl -f -L -o /var/folders/4c/slcchpy55s53ysmz_1_q_gzw0000gp/T/d20230918-1048-8kzufo/file.tgz https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.71.11/react-native-artifacts-0.71.11-hermes-ios-debug.tar.gz --create-dirs --netrc-optional --retry 2 -A 'CocoaPods/1.12.1 cocoapods-downloader/1.6.3'
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
20 459M 20 94.9M 0 0 13231 0 10:06:19 2:05:27 8:00:52 12661
curl: (18) HTTP/2 stream 1 was reset
解决办法
按照错误提示,手动下载依赖包来安装,这里下载的 https://repo1.maven.org/maven2/com/facebook/react/react-native-artifacts/0.71.11/react-native-artifacts-0.71.11-hermes-ios-debug.tar.gz
设置 HERMES_ENGINE_TARBALL_PATH 环境变量,然后重新安装
$ export HERMES_ENGINE_TARBALL_PATH=/Volumes/mydisk/test/react-native-artifacts-0.71.11-hermes-ios-debug.tar.gz
$ pod install
...
网友评论