2014-04-03 55 views
2

我正在嘗試使用此頁上的說明安裝Jekyll(https://help.github.com/articles/using-jekyll-with-pages)。然而,在第二步驟中,bundle install,下面是輸出嘗試安裝Jekyll時發生鐺構建錯誤

Gem::Ext::BuildError: ERROR: Failed to build gem native extension. 

    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb 
checking for main() in -lc... yes 
creating Makefile 

make "DESTDIR=" clean 

make "DESTDIR=" 
compiling redcloth_attributes.c 
compiling redcloth_inline.c 
compiling redcloth_scan.c 
linking shared-object redcloth_scan.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: *** [redcloth_scan.bundle] Error 1 

make failed, exit code 2 

Gem files will remain installed in /var/folders/39/fxww36m16ddggmf4plpl3mv40000gn/T/bundler20140403-1735-6tlte3/RedCloth-4.2.9/gems/RedCloth-4.2.9 for inspection. 
Results logged to /var/folders/39/fxww36m16ddggmf4plpl3mv40000gn/T/bundler20140403-1735-6tlte3/RedCloth-4.2.9/extensions/universal-darwin-13/2.0.0/RedCloth-4.2.9/gem_make.out 
An error occurred while installing RedCloth (4.2.9), and Bundler cannot continue. 
Make sure that `gem install RedCloth -v '4.2.9'` succeeds before bundling. 

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 
我的機器上

和Ruby是2.0.0p247版本。

我已經看到了一些其他人的這個問題,但沒有人有同樣的問題,也沒有解決方案建議他們顯得特別重要,除了莫名其妙獲得打捆的主意,用GCC代替Clang,我不知道該怎麼做。我的一個想法是讓Clang將此視爲警告而不是錯誤,因爲此消息暗示在此版本中可能存在,但我不知道我會怎麼做,尤其是在終端命令的情況下像bundle install。我怎樣才能解決這個問題?

+0

可能重複的[紅寶石寶石安裝的Json失敗上小牛和Xcode的5.1 - 未知參數: '-multiply \ _definedsuppress'](http://stackoverflow.com/questions/22352838/ruby-gem-install- json-fails-on-mavericks-and-xcode-5-1-unknown-argument-mul) – Nakilon

+0

@Nakilon雖然我同意這是一種重複的方式,你可以很容易地回答我提出的問題,但我認爲這個問題有其自身的優點,原因很簡單,它修復了在Github上建立基於Jekyll的博客的規範教程的問題。通過Google搜索這個問題我也找不到這個問題。 –

回答

4

我用ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future bundle install 將此錯誤當作警告。

0
sudo ARCHFLAGS=-Wno-error=unused-command-line-argument-hard-error-in-future gem install jekyll