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

使用CocoaPods安装hermes-engine时遇到报错问题求助

解决brew安装的CocoaPods 1.15.0安装hermes-engine 0.72.6失败的问题

以下是几个实测有效的解决方法,按顺序尝试即可:

  • 清理CocoaPods缓存
    旧缓存经常会导致安装异常,先彻底清理:

    pod cache clean --all
    rm -rf ~/Library/Caches/CocoaPods
    rm -rf ./Pods
    rm Podfile.lock
    

    清理完后重新执行pod install

  • 更新CocoaPods源索引
    源索引过期也会引发找不到包的问题,更新一下:

    pod repo update
    

    如果默认源访问慢或者出错,换成国内镜像源:

    pod repo remove master
    pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
    
  • 强制指定hermes-engine的安装源
    在Podfile里直接指定对应版本的hermes-engine拉取源,绕开本地索引的问题:
    打开Podfile,添加这一行(如果已有hermes-engine的配置就替换掉):

    pod 'hermes-engine', '0.72.6', :source => 'https://cdn.cocoapods.org/'
    

    然后重新执行pod install

  • 切换CocoaPods版本适配
    CocoaPods 1.15.0和hermes-engine 0.72.6可能存在兼容性问题,试试降级到1.14.x版本:

    brew uninstall pod@1.15.0
    brew install pod@1.14
    brew link --overwrite pod@1.14
    

    切换完成后再执行pod install

  • 手动本地安装
    要是上面的方法都不管用,就手动操作:

    1. 找到hermes-engine 0.72.6的spec文件(从CocoaPods的spec仓库获取),保存到项目本地的某个目录
    2. 在Podfile里指定本地路径:
      pod 'hermes-engine', :path => './本地spec文件所在路径'
      
    3. 最后执行pod install

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.06.30 22:05:01