【发布时间】:2014-04-24 03:02:42
【问题描述】:
我正在尝试在我的 Mac 上安装 Jekyll。我的 mac 版本是 10.9,而 ruby 版本是 2.0.0。但是当我在终端中使用sudo gem install jekyll 时,出现了这样的错误:
➜ ~ sudo gem install jekyll
Password:
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=" clean
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
make failed, exit code 2
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/extensions/universal-darwin-13/2.0.0/fast-stemmer-1.0.2/gem_make.out
我查看了这里并尝试了很多方法,但它们都不起作用。我该如何解决这个问题?
【问题讨论】:
-
听起来您可能已经尝试过这些,但是您是否安装了Xcode Command Line Tools?另外,你试过
sudo gem update --system像this吗? -
@nicksuch 是的,我已经尝试了所有这些,但没有工作。我已经使用 rvm 解决了这个问题。
-
我想知道如何解决这个问题而不诉诸使用rvm。一定有办法,不是吗?