[英]Cannot install Ruby AMQP Gem
當前,我已經在Ubuntu 11.10上安裝了Ruby(紅寶石1.9.3p194(2012-04-20版本35410))。 想要使用“ sudo gem install amqp”安裝AMQP gem。 但是它失敗,並顯示以下錯誤消息:
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
如果有人可以幫助我,將不勝感激。 謝謝。
為了編譯本機擴展,您需要一個編譯器。 只需使用以下命令安裝g ++和朋友:
sudo apt-get install build-essential
然后再試一次。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.