LoginSignup
1
1

More than 5 years have passed since last update.

ruby-debug19のインストール

Posted at

あるRailsプロジェクトでbundle installした際に下記のエラが発生したので、その対応について対策を書いておきます。

Installing linecache19 (0.5.12) with native extensions
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.

        /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/bin/ruby extconf.rb --with-ruby-include=/home/hirotaka/.rvm/rubies/ruby-1.9.3-head/
checking for vm_core.h... no
/home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39: Use RbConfig instead of obsolete and deprecated Config.
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
        --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=/home/hirotaka/.rvm/rubies/ruby-1.9.3-head/bin/ruby
        --with-ruby-dir
        --without-ruby-dir
        --with-ruby-include=${ruby-dir}/include
        --with-ruby-lib
        --without-ruby-lib=${ruby-dir}/lib
/home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:268:in `block (2 levels) in read': Looking for http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p173.tar.gz and all I got was a 404! (URI::NotFoundError)
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/net/http.rb:1322:in `block (2 levels) in transport_request'
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/net/http.rb:2671:in `reading_body'
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/net/http.rb:1321:in `block in transport_request'
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/net/http.rb:1293:in `request'
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/net/http.rb:745:in `start'
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/net/http.rb:1284:in `request'
        from /home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:239:in `block in read'
        from /home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:286:in `connect'
        from /home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:234:in `read'
        from /home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:128:in `download'
        from /home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core'
        from /home/hirotaka/.rvm/rubies/ruby-1.9.3-head/lib/ruby/1.9.1/tempfile.rb:320:in `open'
        from /home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/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.3-p173.tar.gz


Gem files will remain installed in /home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/gems/linecache19-0.5.12 for inspection.
Results logged to /home/hirotaka/.rvm/gems/ruby-1.9.3-head@spree-extension/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out

An error occured while installing linecache19 (0.5.12), and Bundler cannot continue.
Make sure that `gem install linecache19 -v '0.5.12'` succeeds before bundling.

ruby-debug19をいれようとした際に、vm_core.hが見つからずに発生してしまっているようです。

rubyのソースの場所を指定します。私の場合はrvm経由でいれているので下記の通りになります。

$ gem install ruby-debug19 -- --with-ruby-include=\$rvm_path/src/ruby-1.9.3-head/
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1