Bundler 无法安装调试器 1.6.8

Posted

技术标签:

【中文标题】Bundler 无法安装调试器 1.6.8【英文标题】:Bundler fails to install debugger 1.6.8 【发布时间】:2014-09-02 13:01:01 【问题描述】:

我尝试查看一些these 的答案,但似乎没有任何效果。这是错误。

funk@funktop ~/rails_projects/hearingtracker $ gem install debugger -v '1.6.8'
Fetching: columnize-0.8.9.gem (100%)
Successfully installed columnize-0.8.9
Fetching: debugger-ruby_core_source-1.3.5.gem (100%)
Successfully installed debugger-ruby_core_source-1.3.5
Fetching: debugger-linecache-1.2.0.gem (100%)
Successfully installed debugger-linecache-1.2.0
Fetching: debugger-1.6.8.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing debugger:
    ERROR: Failed to build gem native extension.

    /home/funk/.rvm/rubies/ruby-2.1.2/bin/ruby extconf.rb
*** 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/funk/.rvm/rubies/ruby-2.1.2/bin/ruby
/home/funk/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `stat': No such file or directory @ rb_file_s_stat - ./212/ruby_debug.h (Errno::ENOENT)
    from /home/funk/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1573:in `block in fu_each_src_dest'
    from /home/funk/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1587:in `fu_each_src_dest0'
    from /home/funk/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:1571:in `fu_each_src_dest'
    from /home/funk/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/fileutils.rb:399:in `cp'
    from extconf.rb:83:in `block in <main>'
    from extconf.rb:82:in `each'
    from extconf.rb:82:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /home/funk/.rvm/gems/ruby-2.1.2/gems/debugger-1.6.8 for inspection.
Results logged to /home/funk/.rvm/gems/ruby-2.1.2/extensions/x86_64-linux/2.1.0/debugger-1.6.8/gem_make.out

【问题讨论】:

不确定,但如果您找不到解决方案,byebug 可能对您有用——假设 Ruby 2+。 【参考方案1】:

debugger gem 不适用于 Ruby 2.1+。请改用byebug

【讨论】:

【参考方案2】:

现在byebug 需要 Ruby 版本 >= 2.2.0

【讨论】:

以上是关于Bundler 无法安装调试器 1.6.8的主要内容,如果未能解决你的问题,请参考以下文章

没有 sudo,Bundler 无法安装任何 gem

安装 pg (0.17.1) 时出错,Bundler 无法继续

Heroku 推送被拒绝,无法通过 Bundler 安装 gem

无法安装调试器

安装 sqlite3 (1.3.7) 时出错,Bundler 无法继续无法创建 rails app

安装 nokogiri (1.10.10) 时出错,Bundler 无法继续