[英]sudo gem install jekyll — failure — clang error unknown argument
Jekyll無法通過gem install
以下是錯誤。 以下是事物和位置的某些版本。
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
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
從命令終端直接輸出:
[~]$ which ruby
/usr/bin/ruby
[~]$ ruby --version
ruby 2.0.0p247 (2013-06-27 revision 41674) [universal.x86_64-darwin13]
[~]$ which gem
/usr/bin/gem
[~]$ gem --version
2.2.2
[~]$ which clang
/usr/bin/clang
[~]$ clang --version
Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
OSX 10.9.2,Xcode 5.1版
Ruby Gem安裝Json中遇到的相同問題在Mavericks和Xcode 5.1上失敗-未知參數:'-multiply_definedsuppress'
我發現本期對jekyll回購的評論很有幫助: https : //github.com/jekyll/jekyll/issues/2125
如果您使用的是rvm或rbenv,則可以簽出Ruby 2.1.1,它應該可以順利安裝。
否則,您可以使用ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install jekyll
希望這可以幫助!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.