尝试运行Octopress的捆绑安装时出现RedCloth makefile错误

时间:2011-11-22 05:28:44

标签: ruby rubygems

我刚从Git(github.com/imathis/octopress.git octopress)下载了Octopress到我的本地机器,但是当我按照说明尝试运行bundle install时,(http://octopress.org/docs/setup/)我得到了制造错误。我正在运行Xcode 3.2版 - 我是否需要从Apple Developer网站更新到4.x?

我还在每个RVM上运行Ruby 1.9.2p180。我需要运行更新的版本吗?

这是我尝试运行sudo gem install 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

2 个答案:

答案 0 :(得分:0)

您应该尝试运行Ruby 1.9.2-p290。

rvm install 1.9.2 && rvm use 1.9.2

答案 1 :(得分:0)

这为我解决了错误..

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

似乎错误是在某些ruby1.9.1-dev构建文件/配置缺失的情况下引起的