2011-11-22 68 views
0

我剛剛從Git(github.com/imathis/octopress.git octopress)將Octopress提取到本地機器,但是當我嘗試運行捆綁安裝時說明,(http://octopress.org/docs/setup/)我得到一個錯誤。我正在運行Xcode 3.2版 - 我是否需要從Apple Developer網站升級到4.x?嘗試運行Octopress捆綁包安裝時出現RedCloth makefile錯誤

我還運行每個RVM的Ruby 1.9.2p180。我是否需要運行更新的版本?

下面是輸出的,當我嘗試運行sudo的創業板安裝RedCloth:

Building native extensions. This could take a while... 
ERROR: Error installing RedCloth: 

ERROR: Failed to build gem native extension. 

/Users/user/.rvm/rubies/ruby-1.9.2-p180/bin/ruby extconf.rb 
checking for main() in -lc... extconf.rb failed 
Could not create Makefile due to some reason, probably lack of 
necessary libraries and/or headers. Check the mkmf.log file for more 
details. You may need configuration options. 

Provided configuration options: 

--with-opt-dir 
--without-opt-dir 
--with-opt-include 
--without-opt-include=${opt-dir}/include 
--with-opt-lib 
--without-opt-lib=${opt-dir}/lib 
--with-make-prog 
--without-make-prog 
--srcdir=. 
--curdir 
--ruby=/Users/user/.rvm/rubies/ruby-1.9.2-p180/bin/ruby 
--with-redcloth_scan-dir 
--without-redcloth_scan-dir 
--with-redcloth_scan-include 
--without-redcloth_scan-include=${redcloth_scan-dir}/include 
--with-redcloth_scan-lib 
--without-redcloth_scan-lib=${redcloth_scan-dir}/lib 
--with-clib 
--without-clib 
/Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The  
complier failed to generate an executable file. (RuntimeError) You have to install  
development tools first. 

from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:435:in `try_link0' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:440:in `try_link' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:552:in `try_func' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:748:in `block in  
have_library' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:693:in `block in  
checking_for' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 
levels) in postpone' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:280:in `block in 
postpone' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:254:in `open' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:276:in `postpone' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:692:in 
`checking_for' 
from /Users/user/.rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/mkmf.rb:743:in 
`have_library' 
from extconf.rb:5:in `<main>' 
Gem files will remain installed in /Users/user/.rvm/gems/ruby-1.9.2-p180/gems/RedCloth- 
4.2.8 for inspection. 
Results logged to /Users/user/.rvm/gems/ruby-1.9.2-p180/gems/RedCloth-  
4.2.8/ext/redcloth_scan/gem_make.out 

回答

0

你應該嘗試運行的Ruby 1.9.2-P290。

rvm install 1.9.2 && rvm use 1.9.2

0

這個固定的錯誤我..

sudo apt-get install ruby1.9.1-full 
sudo update-alternatives --config ruby 

似乎錯誤時引起一些的ruby1.9.1-DEV建立文件/配置缺少

+0

直到現在避免了這種情況,但由於某種原因,即使我有rbenv,因爲這是Ubuntu系統安裝,我不得不經過那一步。謝謝! – alonisser