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

本文详细介绍了在使用Jekyll进行网站构建时遇到Ruby版本过低导致的安装错误,并提供了从安装RVM到更新Ruby版本直至重新安装Jekyll的一系列解决方案。通过遵循文中步骤,开发者可以轻松解决相关问题,确保开发环境的稳定性和高效性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

============================================================
博文原创,转载请声明出处
============================================================

安装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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值