gpt4 book ai didi

ios - 安装 cocoapods 时出现 gem native 扩展错误

转载 作者:行者123 更新时间:2023-12-01 10:05:56 36 4
gpt4 key购买 nike

我正在尝试重新安装 cocoapods在更换 SSD 后在我的 MacBook Air 中,现在出现以下错误。
sudo gem install cocoapods

Building native extensions. This could take a while... ERROR: Error installing cocoapods: ERROR: Failed to build gem native extension.

current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2/ext/ffi_c

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20200308-27204-6l0a5q.rb extconf.rb mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.3.0/gems/ffi-1.12.2 for inspection. Results logged to /Library/Ruby/Gems/2.3.0/extensions/universal-darwin-18/2.3.0/ffi-1.12.2/gem_make.out

最佳答案

打开终端

curl -L https://get.rvm.io | bash -s stable



重新打开终端

rvm install ruby-2.6

rvm use ruby-2.6.3

rvm --default use 2.6.3



来自 MahmoudKhaled 的评论
link

关于ios - 安装 cocoapods 时出现 gem native 扩展错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60585707/

36 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com