Rubygems错误 - 无法在Ruby 1.9.3上安装eventmachne 1.0.3

时间:2014-08-15 20:55:49

标签: ruby-on-rails ruby rvm

$ bundle install
Fetching gem metadata from https://rubygems.org/..........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using addressable 2.3.6
Using chunky_png 1.3.1
Using fssm 0.2.10
Using sass 3.2.19
Using compass 0.12.7
Using breakpoint 2.0.7
Using timers 1.1.0
Using celluloid 0.15.2
Using coderay 1.1.0
Using compass-blend-modes 0.0.2
Using color-schemer 0.2.8
Using compass-normalize 1.5
Using compass-rgbapng 0.2.1
Using compass-validator 3.0.1
Using css_parser 1.3.5

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

    /home/Zach/.rvm/rubies/ruby-1.9.3-p547/bin/ruby.exe extconf.rb
checking for main() in -lssl... yes
checking for main() in -lcrypto... yes
checking for openssl/ssl.h... yes
checking for openssl/err.h... yes
checking for rb_trap_immediate in ruby.h,rubysig.h... no
checking for rb_thread_blocking_region()... yes
checking for inotify_init() in sys/inotify.h... no
checking for __NR_inotify_init in sys/syscall.h... no
checking for writev() in sys/uio.h... yes
checking for rb_wait_for_single_fd()... yes
checking for rb_enable_interrupt()... yes
checking for rb_time_new()... yes
checking for sys/event.h... no
creating Makefile

make  clean

make
compiling binder.cpp
make: g++: Command not found
Makefile:198: recipe for target 'binder.o' failed
make: *** [binder.o] Error 127

make failed, exit code 2

Gem files will remain installed in /home/Zach/.rvm/gems/ruby-1.9.3-p547/gems/eventmachine-1.0.3 for inspection.
Results logged to /home/Zach/.rvm/gems/ruby-1.9.3-p547/extensions/x86_64-cygwin/1.9.1/eventmachine-1.0.3/gem_make.out
An error occurred while installing eventmachine (1.0.3), and Bundler cannot
continue.
Make sure that `gem install eventmachine -v '1.0.3'` succeeds before bundling.

我正在尝试安装缺少的宝石,所以我可以使用drush omega-guard

There was a problem with your setup:                                 [error]
Resolving dependencies...
Bundler can't satisfy your Gemfile's dependencies.
Install missing gems with `bundle install`.

但是我收到了eventmachine的错误,我该如何解决这个问题呢?我尝试更改ruby的版本以查看它是否有效,但我遇到了其他一些错误。

1 个答案:

答案 0 :(得分:0)

显然你没有C ++编译器。如果您正在使用Ubuntu,请尝试sudo apt-get install g++