Xcode

2012年07月30日

OS Xでgem installをしようとすると、以下のようなエラーが出てしまう。 調べてみると、gccを入れるとか、Xcodeを最新にするとか、いろいろ対策がでてくる。 入れようとするgemも、mysql関係や、hpricot関係やらと、千差万別だが、エラーメッセージは 同じようだ。

$ sudo gem install evernote
Building native extensions.  This could take a while...
ERROR:  Error installing evernote:
	ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/thrift-0.8.0 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/thrift-0.8.0/ext/gem_make.out

結論としては、XcodeでCommand line toolsを入れれば、必要なライブラリが入るようだ。 入れ方は、Xcodeを起動して、Xcodeメニューから。

Xcode-->open developer tool-->More developper tool-->safariが開く-->OSに合わせたCommand line toolsをインストール

このインストールが終わると、以下が実行可能となった。

$ sudo gem install evernote
Building native extensions.  This could take a while...
Successfully installed thrift-0.8.0
Successfully installed thrift_client-0.8.1
Successfully installed evernote-1.2.1
3 gems installed
Installing ri documentation for thrift-0.8.0...

Enclosing class/module 'thrift_module' for class BinaryProtocolAccelerated not known

Enclosing class/module 'thrift_module' for class BinaryProtocolAccelerated not known
Installing ri documentation for thrift_client-0.8.1...
Installing ri documentation for evernote-1.2.1...
Installing RDoc documentation for thrift-0.8.0...

Enclosing class/module 'thrift_module' for class BinaryProtocolAccelerated not known

Enclosing class/module 'thrift_module' for class BinaryProtocolAccelerated not known
Installing RDoc documentation for thrift_client-0.8.1...
Installing RDoc documentation for evernote-1.2.1...


sylphide_ffr31mr at 23:33コメント(0)トラックバック(0) 
記事検索
最新コメント
プロフィール

やすき

月別アーカイブ
  • ライブドアブログ