---
title: "ruby 1.9.3-p286 debugger-linecache"
author: "夜鸣猪"
date: "2012-10-18T21:10:20Z"
tags: []
categories: ["编程语言"]
slug: "ruby-1-9-3-p286-debugger-linecache"
draft: false
lastmod: "2013-05-13T05:09:09Z"
id: 1701240
url: "https://hlee.iteye.com/blog/1701240"
---

<span style="color:red">update(05/13/2013)</span>

<span style="color:red">rbenv:</span>

解决方案：

```ruby
gem install debugger-linecache -- --with-ruby-include=/home/user/.rbenv/versions/1.9.3-p392 
```



```ruby
gem install ruby-debug19 -- --with-ruby-include=/home/user/.rbenv/versions/1.9.3-p392 
```




> 
> Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
> 
>         /home/rharrington/.rvm/rubies/ruby-1.9.3-p286/bin/ruby extconf.rb 
> checking for vm_core.h... no
> checking for vm_core.h... no
> Makefile creation failed
> **************************************************************************
> No source for ruby-1.9.3-p286 provided with debugger-ruby_core_source gem.
> **************************************************************************
> *** 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=/home/rharrington/.rvm/rubies/ruby-1.9.3-p286/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
> 
> 
> Gem files will remain installed in /home/rharrington/.rvm/gems/ruby-1.9.3-p286/gems/debugger-linecache-1.1.2 for inspection.
> Results logged to /home/rharrington/.rvm/gems/ruby-1.9.3-p286/gems/debugger-linecache-1.1.2/ext/trace_nums/gem_make.out
> An error occurred while installing debugger-linecache (1.1.2), and Bundler cannot continue.
> Make sure that `gem install debugger-linecache -v '1.1.2'` succeeds before bundling.
> 
> 


解决方案：

```ruby
gem install debugger-linecache -- --with-ruby-include=$rvm_path/src/ruby-1.9.3-p286 
```


详情，走[传送门](http://hlee.iteye.com/blog/1318667)