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

iOS App目录执行bundle install失败问题求助

KMM项目执行bundle install时Gem原生扩展编译失败

我正在尝试用fastlane构建KMM应用的iOS和Android版本,项目地址为https://github.com/WhiteWhiskyWolf/all_you。但在iosApp目录下执行bundle install时,遇到了Gem原生扩展编译失败的错误,具体日志如下:

In Gemfile:
  cocoapods was resolved to 1.10.2, which depends on
    cocoapods-core was resolved to 1.10.2, which depends on
      algoliasearch was resolved to 1.27.5, which depends on
        json


Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

    current directory: /Users/caseydaniel/.rbenv/versions/3.0.1/lib/ruby/gems/3.0.0/gems/unf_ext-0.0.8.2/ext/unf_ext
/Users/caseydaniel/.rbenv/versions/3.0.1/bin/ruby extconf.rb
checking for -lstdc++... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary
libraries and/or headers.  Check the mkmf.log file for more details.  You may
need configuration options. 

我已经尝试过以下操作,但问题仍未解决:

  • 多次重新安装命令行工具
  • 尝试使用GCC编译器替代默认编译器
  • rbenv安装过程中也出现了类似的原生扩展编译失败问题
  • 切换使用Xcode 14.2和14.3 beta版本的命令行工具

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.26 19:13:24