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

无法安装BoringSSL-GRPC(0.0.32),Pod Install遇Git克隆错误求助

解决pod install时BoringSSL-GRPC(0.0.32)安装失败问题

执行pod install时遇到BoringSSL-GRPC(0.0.32)安装失败,报错核心信息如下,且每次执行时error: X bytes of body are still expected中的字节数都会变化:

Downloading dependencies

-> Installing BoringSSL-GRPC (0.0.32)
 > Git download
 > Git download
     $ /usr/local/bin/git clone https://github.com/google/boringssl.git /var/folders/fg/nkf873b15rl4gkd24n7vh5cc0000gn/T/d20240629-37065-fhuz3l --template=

[!] Error installing BoringSSL-GRPC
[!] /usr/local/bin/git clone https://github.com/google/boringssl.git /var/folders/fg/nkf873b15rl4gkd24n7vh5cc0000gn/T/d20240629-37065-fhuz3l --template=

Cloning into '/var/folders/fg/nkf873b15rl4gkd24n7vh5cc0000gn/T/d20240629-37065-fhuz3l'...
error: 2399 bytes of body are still expected
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output

解决方案

  • 清理CocoaPods相关缓存和文件,重新执行安装

    # 清理所有pod缓存
    pod cache clean --all
    # 删除CocoaPods系统缓存
    rm -rf ~/Library/Caches/CocoaPods
    # 删除项目中的Pods目录和锁文件
    rm -rf Pods
    rm -rf Podfile.lock
    # 重新执行安装
    pod install
    
  • 调整Git网络配置,提升克隆稳定性

    # 增大HTTP POST缓冲区
    git config --global http.postBuffer 524288000
    # 增大请求缓冲区
    git config --global http.maxRequestBuffer 100M
    # 开启Git最高压缩级别
    git config --global core.compression 9
    
  • 手动克隆指定版本的BoringSSL到CocoaPods缓存目录

    1. 创建对应缓存目录(若不存在):
      mkdir -p ~/Library/Caches/CocoaPods/Pods/External/BoringSSL-GRPC
      
    2. 克隆仓库并切换到指定版本:
      git clone https://github.com/google/boringssl.git ~/Library/Caches/CocoaPods/Pods/External/BoringSSL-GRPC
      cd ~/Library/Caches/CocoaPods/Pods/External/BoringSSL-GRPC
      git checkout tags/0.0.32
      
    3. 返回项目目录重新执行pod install
  • 更换稳定网络环境,比如切换到有线网络,避免网络波动导致的下载中断

  • 更新CocoaPods至最新版本

    sudo gem install cocoapods
    

内容的提问来源于stack exchange,提问作者Folarin Fadeyi

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.21 19:53:14