[英]Cannot install Ruby AMQP Gem
Currently, I have installed Ruby (ruby 1.9.3p194 (2012-04-20 revision 35410) ) on my Ubuntu 11.10. 当前,我已经在Ubuntu 11.10上安装了Ruby(红宝石1.9.3p194(2012-04-20版本35410))。 Wanted to install the AMQP gem using "sudo gem install amqp".
想要使用“ sudo gem install amqp”安装AMQP gem。 But it fails with the following error message :
但是它失败,并显示以下错误消息:
Building native extensions. This could take a while...
ERROR: Error installing amqp:
ERROR: Failed to build gem native extension.
/usr/local/bin/ruby extconf.rb
checking for main() in -lssl... no
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... yes
checking for writev() in sys/uio.h... yes
checking for rb_thread_check_ints()... yes
checking for rb_time_new()... yes
checking for sys/event.h... no
checking for epoll_create() in sys/epoll.h... yes
creating Makefile
make
compiling ed.cpp
make: g++: Command not found
make: *** [ed.o] Error 127
Gem files will remain installed in /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.0/ext/gem_make.out
Would appreciate if someone could help me out. 如果有人可以帮助我,将不胜感激。 Thanks.
谢谢。
In order to compile native extensions, you need a compiler. 为了编译本机扩展,您需要一个编译器。 Just install g++ and friends using:
只需使用以下命令安装g ++和朋友:
sudo apt-get install build-essential
and try again. 然后再试一次。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.