安装jekyll出错 Failed to build gem native extension.

============================================================
博文原创,转载请声明出处
电子咖啡-专注于移动互联网
============================================================

安装jekyll出错
环境Xcode 5.1and OS X 10.9
command-line Tools已是最新


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
creating Makefile

make "DESTDIR="
compiling porter.c
porter.c:359:27: warning: '&&' within '||' [-Wlogical-op-parentheses]
      if (a > 1 || a == 1 && !cvc(z, z->k - 1)) z->k--;
                ~~ ~~~~~~~^~~~~~~~~~~~~~~~~~~~
porter.c:359:27: note: place parentheses around the '&&' expression to silence this warning
      if (a > 1 || a == 1 && !cvc(z, z->k - 1)) z->k--;
                          ^
                   (                          )
1 warning generated.
compiling porter_wrap.c
linking shared-object stemmer.bundle
clang: error: unknown argument: '-multiply_definedsuppress' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
make: *** [stemmer.bundle] Error 1


Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/gems/fast-stemmer-1.0.2/ext/gem_make.out


原因:

ruby是2.0,版本低

解决方法,

1、安装rvm

2、更新ruby到2.1

3、重新安装gem install jekyll

参考:

http://www.soimort.org/posts/101/

https://github.com/jekyll/jekyll/issues/2125#issuecomment-37373112

你可能感兴趣的:(安装jekyll出错 Failed to build gem native extension.)