2016-03-05 121 views
3

我试图建立在亚马逊Web服务on Rails的Ruby的RVM Ruby 2.3.0 DevKit未安装?

  • 红宝石2.3.0 [x86_64的]与RVM
  • RVM 11年1月26日
  • 导轨安装5.0.0beta3
  • Capistrano的3.4

当部署到服务器时,一切运行良好,直到与捆绑软件依赖安装。似乎是说DevKit没有与Ruby一起安装

... 
Installing mini_portile2 2.0.0 
Using json 1.8.3 
Installing nio4r 1.2.1 with native extensions 

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

    current directory: /var/www/myWebsite/shared/bundle/ruby/2.3.0/gems/nio4r-1.2.1/ext/nio4r 
/home/ubuntu/.rvm/rubies/ruby-2.3.0/bin/ruby -r ./siteconf20160305-3397-alwetw.rb extconf.rb 
checking for unistd.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=/home/ubuntu/.rvm/rubies/ruby-2.3.0/bin/$(RUBY_BASE_NAME) 
/home/ubuntu/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:456:in `try_do': The compiler failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
     from /home/ubuntu/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:587:in `try_cpp' 
     from /home/ubuntu/.rvm/rubies/ruby-2.3.0/lib/ruby/2.3.0/mkmf.rb:1091:in `block in have_header' 
... 

如何检查RVM是否正确安装了DevKit?或者,也许这个问题在别的地方?它还提到缺少库/头

回答

9

啊,只是发现和阅读的日志文件,它向我指出缺少库gmp

以下命令解决了这一问题:

sudo apt-get install libgmp3-dev 
+0

你是最棒的什么样的人。 –