You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Flutter项目执行pod install/update时BoringSSL-GRPC安装失败求助

Flutter项目中Pod安装BoringSSL-GRPC失败的解决方法

以下是针对你遇到的RPC failed; curl 18 transfer closed错误的可行解决方法:

方法1:切换Git克隆协议为SSH

将GitHub的HTTPS克隆自动替换为SSH协议,避免HTTP连接中断问题:

git config --global url."git@github.com:".insteadOf "https://github.com/"

完成后重新执行pod install或pod update。

方法2:彻底清理缓存后重试

清理所有相关缓存,避免残留的损坏文件影响安装:

  1. 清理Flutter项目缓存:
flutter clean
  1. 进入iOS目录,删除Pods文件夹和锁文件:
cd ios
rm -rf Pods Podfile.lock
  1. 清理CocoaPods全局缓存:
pod cache clean --all
  1. 重新执行安装:
pod install

方法3:手动克隆BoringSSL到本地并指定路径

如果自动克隆始终失败,手动克隆仓库后让Pod使用本地副本:

  1. 手动克隆BoringSSL到本地稳定路径:
git clone git@github.com:google/boringssl.git ~/local-boringssl
  1. 在iOS目录的Podfile中添加以下配置,指定BoringSSL的本地源:
pod 'BoringSSL-GRPC', :git => '~/local-boringssl', :tag => '0.0.24'
  1. 执行pod install。

方法4:调整Git网络超时参数

延长Git的网络超时时间,避免因网络波动导致的中断:

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 999999
git config --global core.longpaths true

方法5:升级或指定GRPC版本

BoringSSL-GRPC是GRPC的依赖,尝试升级GRPC版本可能解决版本兼容或源的问题:
在Podfile中添加GRPC的版本指定(替换为最新稳定版):

pod 'gRPC', '~> 1.59.0'

然后执行pod update gRPC。


内容的提问来源于stack exchange,提问作者Wishwell Oklu

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.30 09:08:26