无法使用gem install

时间:2016-10-10 12:33:11

标签: rubygems jekyll

我正在尝试使用以下命令在我的Mac上安装Jekyll:

sudo gem install jekyll

然而我收到错误:

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

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
checking for ffi.h... *** 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.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.

我在这里做错了什么?

1 个答案:

答案 0 :(得分:0)

关键信息是:

You have to install development tools first.

查看https://stackoverflow.com/a/9353468/500526