3
3

More than 5 years have passed since last update.

gem installでエラー

Posted at

macにGCC-10.7-v2をインストールしたらgem installで以下のエラーが出るようになってしまった。

$ sudo gem install cocoapods                                                                                        (issue/6)
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing cocoapods:
    ERROR: Failed to build gem native extension.

    /Users/kenjikinukawa/.rbenv/versions/2.0.0-p0/bin/ruby extconf.rb
checking for -std=c99 option to compiler... yes
checking for CoreFoundation... no
checking for main() in -lCoreFoundation... no
CoreFoundation is needed to build the Xcodeproj C extension.
*** 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
    --without-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
    --srcdir=.
    --curdir
    --ruby=/Users/kenjikinukawa/.rbenv/versions/2.0.0-p0/bin/ruby
    --with-CoreFoundationlib
    --without-CoreFoundationlib


Gem files will remain installed in /Users/kenjikinukawa/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/xcodeproj-0.5.5 for inspection.
Results logged to /Users/kenjikinukawa/.rbenv/versions/2.0.0-p0/lib/ruby/gems/2.0.0/gems/xcodeproj-0.5.5/ext/xcodeproj/gem_make.out

Xcodeのcommand line toolsをインストールすれば治るという情報が落ちていたが、すでにインストール済みだった。
エラーログを見ると、むしろcommand line toolsのあとにGCC-10.7-v2をインストールしたのが原因臭かったので、command line toolsを入れなおしたらなおった。

XcodeからインストールしたCommand Line Toolsを削除する方法

3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3