RVM Ruby 2.3.0 DevKit 未安装?

RVM Ruby 2.3.0 DevKit not installed?

我正在尝试在亚马逊网络服务 Rails 上设置 Ruby

部署到服务器时,一切运行正常,直到使用捆绑器安装依赖项。似乎说 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?或者也许问题出在其他地方?它还提到缺少 libraries/headers

啊,刚刚找到并阅读了那个日志文件,它指出我缺少一个库 gmp

以下命令解决了问题:

sudo apt-get install libgmp3-dev