在ruby 2.0.0p247上替代'ruby-debug19'(罪魁祸首'linecache19')? [英] Alternative to 'ruby-debug19' (culprit 'linecache19') on ruby 2.0.0p247?

查看:104
本文介绍了在ruby 2.0.0p247上替代'ruby-debug19'(罪魁祸首'linecache19')?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很沮丧,因为我在这个问题上尝试了其他的StackOverflow文章,但在解决我自己的错误方面一直没有成功。当我打电话时

 'gem install linecache19'

...出现以下错误

 错误:安装linecache19错误:
错误:无法构建gem原生扩展。

/home/user/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
检查vm_core.h ...否
/ home / user / .rvm / gems / ruby​​-2.0.0-p247 / gems / ruby​​_core_source-0.1.5 / lib / ruby​​_core_source.rb:39:在`create_makefile_with_core'中:使用RbConfig而不是废弃且不推荐使用Config。
/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:in`create_makefile_with_core':使用RbConfig而不是废弃且不推荐使用配置。
检查vm_core.h ... no
*** extconf.rb失败***
由于某些原因无法创建Makefile,可能缺少必要的
库以及/或标题。检查mkmf.log文件以获取更多详细信息。您可能
需要配置选项。

提供的配置选项:
--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 / user / .rvm / rubies / ruby​​-2.0.0 -p247 / 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} /
/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib /contrib/uri_ext.rb:268:in'block(2 levels)in read':寻找http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-2.0.0-p247.tar。 GZ和我得到的是一个404! (URI :: NotFoundError)
from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1413:in`block(2 levels)in transport_request'
from /home/user/.rvm/rubies-2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:162:in`reading_body'
from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1412:in`block in transport_request'
from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in`catch'
from /home/user/.rvm /rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in`transport_request'
from /home/user/.rvm/rubies/ruby-2.0。 0-p247 / lib / ruby​​ / 2.0.0 / net / http.rb:1376:在`request'中
来自/home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby /2.0.0/net/http.rb:1369:in`block in request'
from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/ net / http.rb:852:在`开始'
从/home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1367 :在`request'$ b $中b from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:239:in`block in read'
from / home / user / .rvm / gems / ruby​​-2.0.0 -p247 / gems / ruby​​_core_source-0.1.5 / lib / contrib / uri_ext.rb:286:从/ home / user /连接
。 rvm / gems / ruby​​-2.0.0-p247 / gems / ruby​​_core_source-0.1.5 / lib / contrib / uri_ext.rb:234:在`read'
从/home/user/.rvm/gems/ruby -2.0.0-p247 / gems / ruby​​_core_source-0.1.5 / lib / contrib / uri_ext.rb:128:在`下载'
从/home/user/.rvm/gems/ruby-2.0.0- p247 / gems / ruby​​_core_source-0.1.5 / lib / ruby​​_core_source.rb:55:在`block in create_makefile_with_core'
from /home/user/.rvm/rubies-2.0.0-p247/lib/ruby /2.0.0/tempfile.rb:324:in从/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source在`open'
中打开。 rb:51:在`create_makefile_with_core'
从extconf.rb:19:在`< main>'
请求http://ftp.ruby-lang.org/pub/ruby/1.9/ruby -2.0.0-p247.tar.gz


Gem文件将保留安装在/home/user/.rvm/gems/ruby-2.0.0-p247/gems/linecache19-0.5.12中进行检查。
记录到/home/user/.rvm/gems/ruby-2.0.0-p247/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out



  /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:268:in`block(2 levels)in read':寻找http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-2.0.0-p247.tar.gz和我得到的只是一个404! (URI :: NotFoundError)

显然这不起作用... url http://ftp.ruby-lang.org/pub/ ruby / 1.9 / ruby​​-2.0.0-p247.tar.gz 没有任何意义。 (访问Ruby1.9然后查找Ruby2.0 tar.gz)

这是一个类项目(对于CS169:加州大学伯克利分校的软件工程)需要gem'ruby-debug19',它会尝试安装'linecache19'。



是否必须降级到ruby1.9,还是可以继续使用ruby2。 0



当我打电话时

  $ ruby -v 

我得到以下...

  ruby​​ 2.0.0p247(2013-06-27 revision 41674)[x86_64-linux] 

我正在使用RVM。



我有点怀疑linecache19不支持ruby 2.0。

解决方案

尝试安装 byebug ,而不是Ruby 2.0调试器。您似乎已经拥有了Ruby的最低可支持补丁级别。


I am frustrated because I have tried other StackOverflow articles on this issue, but have been unsuccessful in fixing my own error. When I call

'gem install linecache19'

...the following error is outputed

ERROR:  Error installing linecache19:
    ERROR: Failed to build gem native extension.

    /home/user/.rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for vm_core.h... no
/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:in `create_makefile_with_core': Use RbConfig instead of obsolete and deprecated Config.
/home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:39:in `create_makefile_with_core': 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
    --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/user/.rvm/rubies/ruby-2.0.0-p247/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}/
/home/user/.rvm/gems/ruby-2.0.0-p247/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-2.0.0-p247.tar.gz and all I got was a 404! (URI::NotFoundError)
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1413:in `block (2 levels) in transport_request'
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http/response.rb:162:in `reading_body'
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1412:in `block in transport_request'
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in `catch'
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1403:in `transport_request'
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1376:in `request'
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1369:in `block in request'
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:852:in `start'
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/net/http.rb:1367:in `request'
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:239:in `block in read'
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:286:in `connect'
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:234:in `read'
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/contrib/uri_ext.rb:128:in `download'
    from /home/user/.rvm/gems/ruby-2.0.0-p247/gems/ruby_core_source-0.1.5/lib/ruby_core_source.rb:55:in `block in create_makefile_with_core'
    from /home/user/.rvm/rubies/ruby-2.0.0-p247/lib/ruby/2.0.0/tempfile.rb:324:in `open'
    from /home/user/.rvm/gems/ruby-2.0.0-p247/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-2.0.0-p247.tar.gz


Gem files will remain installed in /home/user/.rvm/gems/ruby-2.0.0-p247/gems/linecache19-0.5.12 for inspection.
Results logged to /home/user/.rvm/gems/ruby-2.0.0-p247/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out

Please notice the culprit line...

/home/user/.rvm/gems/ruby-2.0.0-p247/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-2.0.0-p247.tar.gz and all I got was a 404! (URI::NotFoundError)

Obviously this does not work...the url http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-2.0.0-p247.tar.gz doesn't make sense. (Accesses Ruby1.9 then looks for the Ruby2.0 tar.gz)

This is for a class project (for CS169: Software Engineering at UC Berkeley) that requires the gem 'ruby-debug19', which tries to install 'linecache19'.

Do I have to downgrade to ruby1.9, or can I keep using ruby2.0?

When I call

$ruby -v

I get the following...

ruby 2.0.0p247 (2013-06-27 revision 41674) [x86_64-linux]

I am using RVM.

I am slightly suspicious that linecache19 does not support ruby 2.0.

解决方案

Try installing byebug instead of debugger for Ruby 2.0. You already seem to have the minimum supportable patchlevel of Ruby.

这篇关于在ruby 2.0.0p247上替代'ruby-debug19'(罪魁祸首'linecache19')?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆