我尝试按照文档安装 octopress,但在此过程中出现此错误。(之后'bundle install'
)
试图手动重新安装它,但没有成功。
Installing rdiscount (2.0.7.3)
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/Users/*****/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
checking for random()... yes
checking for srandom()... yes
checking for rand()... yes
checking for srand()... yes
checking size of unsigned long... *** 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/*****/.rvm/rubies/ruby-1.9.3-p194/bin/ruby
--with-rdiscount-dir
--without-rdiscount-dir
--with-rdiscount-include
--without-rdiscount-include=${rdiscount-dir}/include
--with-rdiscount-lib
--without-rdiscount-lib=${rdiscount-dir}/lib
/Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:597:in `Integer': can't convert nil into Integer (TypeError)
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:597:in `block in try_constant'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:330:in `popen'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:330:in `block in xpopen'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:323:in `xpopen'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:596:in `try_constant'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1156:in `block in check_sizeof'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:790:in `block in checking_for'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block (2 levels) in postpone'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:284:in `block in postpone'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:254:in `open'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:280:in `postpone'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:789:in `checking_for'
from /Users/*****/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/mkmf.rb:1155:in `check_sizeof'
from extconf.rb:11:in `block in sized_int'
from extconf.rb:11:in `each'
from extconf.rb:11:in `find'
from extconf.rb:11:in `sized_int'
from extconf.rb:15:in `<main>'
Gem files will remain installed in /Users/*****/.rvm/gems/ruby-1.9.3-p194/gems/rdiscount-2.0.7.3 for inspection.
Results logged to /Users/*****/.rvm/gems/ruby-1.9.3-p194/gems/rdiscount-2.0.7.3/ext/gem_make.out
An error occurred while installing rdiscount (2.0.7.3), and Bundler cannot continue.
Make sure that `gem install rdiscount -v '2.0.7.3'` succeeds before bundling.
我很确定这很容易,只是我现在太累了..如果我明白了,我会更新帖子,不会让任何人浪费时间。
- 已安装 Mac Os X 山狮和 ruby 1.9.3。