相关疑难解决方法(0)

错误:安装cocoapods时出错:错误:无法构建gem原生扩展

我正在尝试将cocoapods安装到运行OSX 10.9.1(新的mavericks)的macbook pro中,并且在类型gem install cocoapodsI之后出现以下错误:

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

        "/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby" -rubygems /usr/local/rvm/gems/ruby-1.9.3-p194/gems/rake-10.1.1/bin/rake RUBYARCHDIR=/Users/rangreenberg/gems/gems/xcodeproj-0.14.1/ext RUBYLIBDIR=/Users/rangreenberg/gems/gems/xcodeproj-0.14.1/ext
/usr/local/rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for -std=c99 option to compiler... *** 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.

Provided configuration options:
    --with-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog …
Run Code Online (Sandbox Code Playgroud)

ios cocoapods osx-mavericks

20
推荐指数
14
解决办法
1万
查看次数

Cocoapods 安装错误 mkmf.rb 找不到 ruby​​ 的头文件

sudo gem install cocoapods抛出mkmf.rb can't find header files for ruby

完整输出:

Last login: Sat Mar 21 19:00:12 on ttys000
praneeths-MacBook-Air:~ praneeth$ sudo gem install cocoapods
Password:
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 ./siteconf20200321-2325-4gn5jh.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 …
Run Code Online (Sandbox Code Playgroud)

ruby xcode cocoapods firebase

13
推荐指数
1
解决办法
3263
查看次数

颤振医生 - CocoaPods 已安装但无法正常工作

使用 zsh - 用于在 bash
brew doctor 中工作 - 您的系统已准备好进行 brew 。
颤振医生给出了这个错误

[!] Xcode - develop for iOS and macOS (Xcode 12.2)
    ? CocoaPods installed but not working.
        You appear to have CocoaPods installed but it is not working.
        This can happen if the version of Ruby that CocoaPods was installed with is different from the one being used to invoke it.
        This can usually be fixed by re-installing CocoaPods. For more info, see https://github.com/flutter/flutter/issues/14293.
      To re-install CocoaPods, run: …
Run Code Online (Sandbox Code Playgroud)

homebrew cocoapods flutter

5
推荐指数
3
解决办法
2271
查看次数

标签 统计

cocoapods ×3

firebase ×1

flutter ×1

homebrew ×1

ios ×1

osx-mavericks ×1

ruby ×1

xcode ×1