2016-03-05 132 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

你是最棒的什麼樣的人。 –