0
[user@host ~]$ sudo gem install linecache19-0.5.12.gem 
Building native extensions.  This could take a while...
ERROR:  Error installing linecache19-0.5.12.gem:
        ERROR: Failed to build gem native extension.

        /usr/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
*** 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/ruby
        --with-ruby-dir
        --without-ruby-dir
        --with-ruby-include
        --without-ruby-include=${ruby-dir}/include
        --with-ruby-lib
        --without-ruby-lib=${ruby-dir}/lib
/usr/lib64/ruby/1.9.1/net/http.rb:644:in `initialize': Connection timed out - connect(2) (Errno::ETIMEDOUT)
        from /usr/lib64/ruby/1.9.1/net/http.rb:644:in `open'
        from /usr/lib64/ruby/1.9.1/net/http.rb:644:in `block in connect'
        from /usr/lib64/ruby/1.9.1/timeout.rb:44:in `timeout'
        from /usr/lib64/ruby/1.9.1/timeout.rb:89:in `timeout'
        from /usr/lib64/ruby/1.9.1/net/http.rb:644:in `connect'
        from /usr/lib64/ruby/1.9.1/net/http.rb:637:in `do_start'
        from /usr/lib64/ruby/1.9.1/net/http.rb:626:in `start'
        from /usr/lib64/ruby/1.9.1/net/http.rb:1168:in `request'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:239:in `block in read'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:286:in `connect'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:234:in `read'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:128:in `download'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core'
        from /usr/lib64/ruby/1.9.1/tempfile.rb:320:in `open'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core'
        from extconf.rb:19:in `<main>'
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz


Gem files will remain installed in /usr/lib64/ruby/gems/1.9.1/gems/linecache19-0.5.12 for inspection.
Results logged to /usr/lib64/ruby/gems/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out

このエラーを追跡するにはどうすればよいですか? 私が知る限り、gem_make.out には特に有用なものはありません。

/usr/bin/ruby extconf.rb
checking for vm_core.h... no
checking for vm_core.h... no
*** 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/ruby
        --with-ruby-dir
        --without-ruby-dir
        --with-ruby-include
        --without-ruby-include=${ruby-dir}/include
        --with-ruby-lib
        --without-ruby-lib=${ruby-dir}/lib
/usr/lib64/ruby/1.9.1/net/http.rb:644:in `initialize': Connection timed out - connect(2) (Errno::ETIMEDOUT)
        from /usr/lib64/ruby/1.9.1/net/http.rb:644:in `open'
        from /usr/lib64/ruby/1.9.1/net/http.rb:644:in `block in connect'
        from /usr/lib64/ruby/1.9.1/timeout.rb:44:in `timeout'
        from /usr/lib64/ruby/1.9.1/timeout.rb:89:in `timeout'
        from /usr/lib64/ruby/1.9.1/net/http.rb:644:in `connect'
        from /usr/lib64/ruby/1.9.1/net/http.rb:637:in `do_start'
        from /usr/lib64/ruby/1.9.1/net/http.rb:626:in `start'
        from /usr/lib64/ruby/1.9.1/net/http.rb:1168:in `request'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:239:in `block in read'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:286:in `connect'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:234:in `read'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:128:in `download'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core'
        from /usr/lib64/ruby/1.9.1/tempfile.rb:320:in `open'
        from /usr/lib64/ruby/gems/1.9.1/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:51:in `create_makefile_with_core'
        from extconf.rb:19:in `<main>'
Requesting http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.2-p290.tar.gz

私の展開には ruby​​ 1.9.2p290 が必要なので、悲しいことにバージョンを上げることはできません。エラーが要求しているように見える追加のライブラリ/ヘッダーを取得するにはどうすればよいですか?

4

1 に答える 1

0

デプロイメントには 1.9.2 が必要で、バックトレースは 1.9.1 を使用していると言っています。正しいルビーバージョンに切り替えるとうまくいくかもしれません。

また、アプリケーションに が含まれている場合ruby-debug19(これには が必要ですlinecached19)、単純に に切り替えてみてくださいdebugger

于 2013-08-15T21:38:22.870 に答える