5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

fatal error: 'ruby/config.h' file not found エラーの対応

Posted at

エラー内容

osx10.9.5環境でshenzhenをインストールしようとしたら

#  ~  sudo gem install shenzhen
Password:
Building native extensions.  This could take a while...
ERROR:  Error installing shenzhen:
	ERROR: Failed to build gem native extension.

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20150715-80705-c762g.rb extconf.rb
creating Makefile

make "DESTDIR=" clean

make "DESTDIR="
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby.h:33:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
# include "ruby/config.h"
         ^
1 error generated.
make: *** [generator.o] Error 1

make failed, exit code 2

エラーが出てインストールに失敗する

対応

http://stackoverflow.com/questions/26434642/yosemite-upgrade-broke-ruby-h

Command Line Toolsをインストールする
該当のバージョンに合わせたものをダウンロードしてインストール。
今回はxcodeのバージョンに合わせてCommand Line Tools (Osx 10.9) for Xcode 6.2を入れた。

Command Line Toolsインストール後、shenzhenのインストールは出来た。

5
6
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
5
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?