2

ubuntu 12.04 LTS、Ruby 2.0 with RVM を使用しています。

インストール中。このエラーが発生します。

checking for alloca.h... *** /home/pastelcorp/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10/ext/ruby/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=/home/pastelcorp/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10/ext/ruby
    --curdir
    --ruby=/home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/bin/ruby
/home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:430:in `try_do': The compiler failed to generate an executable file. (RuntimeError)
You have to install development tools first.
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:561:in `try_cpp'
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:1040:in `block in have_header'
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:891:in `block in checking_for'
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:336:in `block (2 levels) in postpone'
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:306:in `open'
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:336:in `block in postpone'
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:306:in `open'
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:332:in `postpone'
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:890:in `checking_for'
from /home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/mkmf.rb:1039:in `have_header'
from /home/pastelcorp/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10/ext/ruby/extconf.rb:37:in `<main>'
rake aborted!
Command failed with status (1): [cd 'buildout/ruby/ruby-2.0.0-x86_64-linux/...]
/home/pastelcorp/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10/build/ruby_extension.rb:55:in `block in <top (required)>'
/home/pastelcorp/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `eval'
/home/pastelcorp/.rvm/gems/ruby-2.0.0-p247/bin/ruby_noexec_wrapper:14:in `<main>'
Tasks: TOP => nginx => buildout/ruby/ruby-2.0.0-x86_64-linux//passenger_native_support.so => buildout/ruby/ruby-2.0.0-x86_64-linux//Makefile
(See full trace by running task with --trace)

最初に開発ツールをインストールする必要があると言っています。しかし、私はすでにやったsudo apt-get install build-essential

これが私のmkmf.logファイルです(まったく理解できませんでした)

" -o conftest -I/home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/x86_64-linux -I/home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/include/ruby-2.0.0 -I/home/pastelcorp/.rvm/gems/ruby-2.0.0-p247/gems/passenger-4.0.10/ext/ruby     -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wunused-variable -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wimplicit-function-declaration  -fPIC -g conftest.c  -L. -L/home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib -Wl,-R/home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib -L. -fstack-protector -rdynamic -Wl,-export-dynamic     '-Wl,-rpath,/../lib' -Wl,-R -Wl,/home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib -L/home/pastelcorp/.rvm/rubies/ruby-2.0.0-p247/lib -lruby   -lpthread"
sh: 1: -o: not found
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5:   return 0;
6: }
/* end */

これについてのアイデアはありますか?

4

2 に答える 2

13

問題が解決しました。

RVM では ruby​​2.0.0 をソースをコンパイルせずにバイナリでインストールしました。

だから私はした

rvm remove 2.0.0rvm install 2.0.0 ----disable-binary

そのため、Ruby 2.0.0 はソースからコンパイルされており、パッセンジャー コンパイルは正常に動作します。

于 2013-07-25T16:35:36.903 に答える