2010-03-25 4 views
1

Как исправить эту ошибку и установить тонкие или другие драгоценные камни?Не удается установить тонкий с помощью rubygems на Ubuntu 9.10

 
$ sudo gem install thin 
Building native extensions. This could take a while... 
ERROR: Error installing thin: 
    ERROR: Failed to build gem native extension. 

/usr/bin/ruby1.9.1 extconf.rb 
checking for rb_trap_immediate in ruby.h,rubysig.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=/usr/bin/ruby1.9.1 
/usr/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed to generate an executable file. (RuntimeError) 
You have to install development tools first. 
    from /usr/lib/ruby/1.9.1/mkmf.rb:425:in `try_compile' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:543:in `try_var' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:791:in `block in have_var' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:668:in `block in checking_for' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels) in postpone' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:248:in `open' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:274:in `block in postpone' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:248:in `open' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:270:in `postpone' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for' 
    from /usr/lib/ruby/1.9.1/mkmf.rb:790:in `have_var' 
    from extconf.rb:16:in `' 


Gem files will remain installed in /var/lib/gems/1.9.1/gems/eventmachine-0.12.10 for inspection. 
Results logged to /var/lib/gems/1.9.1/gems/eventmachine-0.12.10/ext/gem_make.out 

Addtional детали, как показано ниже

 
$ cat /etc/issue 
Ubuntu 9.10 \n \l 
$ dpkg -l | grep ruby 
ii libreadline-ruby1.9.1    1.9.1.243-2     Readline interface for Ruby 1.9.1 
ii libruby1.9.1      1.9.1.243-2     Libraries necessary to run Ruby 1.9.1 
ii ruby1.9.1       1.9.1.243-2     Interpreter of object-oriented scripting lan 
ii ruby1.9.1-dev      1.9.1.243-2     Header files for compiling extension modules 
ii rubygems1.9.1      1.3.5-1ubuntu2    package management framework for Ruby librar 
$ ruby -v 
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux] 
$ gem list 

*** LOCAL GEMS *** 

rack (1.1.0) 
sinatra (1.0) 

ответ

2

я имел:

ERROR: Error installing thin: 
    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 rb_thread_check_ints()... no 
checking for rb_time_new()... yes 
checking for sys/event.h... no 
checking for epoll_create() in sys/epoll.h... yes 
checking for main() in -lcrypto... no 
creating Makefile 

make 
g++ -I. -I. -I/usr/lib/ruby/1.8/x86_64-linux -I. -DBUILD_FOR_RUBY -DHAVE_RB_TRAP_IMMEDIATE -DHAVE_RBTRAP -DHAVE_INOTIFY_INIT -DHAVE_INOTIFY -DHAVE_WRITEV -DHAVE_WRITEV -DHAVE_RB_TIME_NEW -DOS_UNIX -DHAVE_EPOLL_CREATE -DHAVE_EPOLL -DWITHOUT_SSL -I/include/include -fPIC -fno-strict-aliasing -g -g -O2 -fPIC -c emwin.cpp 
make: g++: Command not found 
make: *** [emwin.o] Error 127 

он отметил, что г ++ не хватает, так что я сделал:

sudo apt-get install g++ 

, а затем побежал:

sudo gem install thin 

и работал

также, я не уверен, если это может иметь ничего общего с этой установки, но так как это 64-битной системы, иногда предосторожности, я установить 32 ЛИЭС:

sudo apt-get install ia32libs 

, но я всегда устанавливать 32libs как только я настроить новый 64-разрядный сервер

+2

ищет эквивалент этого ответа для OS X ... – jm3

+0

здесь же. В Mac OS 10.9, Ruby 2.0.0-p247 – slant

Смежные вопросы