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
相关产品推荐
相关产品推荐

