我怎么能够纠正这一错误,并安装薄板或其他宝石?
$ sudo gem install thin Building native extensions. This could take a while... ERROR: Error installing thin: ERROR: Failed to build gem native extension. /usr/bin/ruby1.9.1 extconf.rb checking for rb_trap_immediate in ruby.h,rubysig.h... *** 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=/usr/bin/ruby1.9.1 /usr/lib/ruby/1.9.1/mkmf.rb:362:in `try_do : The complier failed to generate an executable file. (RuntimeError) You have to install development tools first. from /usr/lib/ruby/1.9.1/mkmf.rb:425:in `try_compile from /usr/lib/ruby/1.9.1/mkmf.rb:543:in `try_var from /usr/lib/ruby/1.9.1/mkmf.rb:791:in `block in have_var from /usr/lib/ruby/1.9.1/mkmf.rb:668:in `block in checking_for from /usr/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in postpone from /usr/lib/ruby/1.9.1/mkmf.rb:248:in `open from /usr/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone from /usr/lib/ruby/1.9.1/mkmf.rb:248:in `open from /usr/lib/ruby/1.9.1/mkmf.rb:270:in `postpone from /usr/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for from /usr/lib/ruby/1.9.1/mkmf.rb:790:in `have_var from extconf.rb:16:in ` Gem files will remain installed in /var/lib/gems/1.9.1/gems/eventmachine-0.12.10 for inspection. Results logged to /var/lib/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out
添加信息如下:
$ cat /etc/issue Ubuntu 9.10 l $ dpkg -l | grep ruby ii libreadline-ruby1.9.1 1.9.1.243-2 Readline interface for Ruby 1.9.1 ii libruby1.9.1 1.9.1.243-2 Libraries necessary to run Ruby 1.9.1 ii ruby1.9.1 1.9.1.243-2 Interpreter of object-oriented scripting lan ii ruby1.9.1-dev 1.9.1.243-2 Header files for compiling extension modules ii rubygems1.9.1 1.3.5-1ubuntu2 package management framework for Ruby librar $ ruby -v ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux] $ gem list *** LOCAL GEMS *** rack (1.1.0) sinatra (1.0)