eventmachineのインストール失敗解決方法

eventmachineのインストールでまれに見るエラーだったのでメモ

shell>gem install eventmachine
Building native extensions.  This could take a while...
ERROR:  Error installing eventmachine:
	ERROR: Failed to build gem native extension.

/usr/bin/ruby1.8 extconf.rb
checking for rb_trap_immediate in ruby.h,rubysig.h... yes
checking for rb_thread_blocking_region()... no
checking for inotify_init() in sys/inotify.h... yes
checking for writev() in sys/uio.h... yes
checking for sys/event.h... no
checking for sys/epoll.h... yes
checking for main() in -lcrypto... no
creating Makefile

make
g++ -I. -I. -I/usr/lib/ruby/1.8/i486-linux -I. -DBUILD_FOR_RUBY -DHAVE_RB_TRAP_IMMEDIATE -DHAVE_RBTRAP -DHAVE_INOTIFY_INIT -DHAVE_INOTIFY -DHAVE_WRITEV -DHAVE_WRITEV -DOS_UNIX -DHAVE_SYS_EPOLL_H -DHAVE_EPOLL -DWITHOUT_SSL -I/include/include  -D_FILE_OFFSET_BITS=64  -fPIC -fno-strict-aliasing -g -g -O2  -fPIC    -c em.cpp
make: g++: Command not found
make: *** [em.o] Error 127

make: g++: Command not found

shell>apt-get install g++
shell>gem install eventmachine
Building native extensions.  This could take a while...
Successfully installed eventmachine-0.12.8
1 gem installed
Installing ri documentation for eventmachine-0.12.8...
Installing RDoc documentation for eventmachine-0.12.8...