代码之家  ›  专栏  ›  技术社区  ›  cduhn

要求“ruby debug”加载错误:找不到符号

  •  1
  • cduhn  · 技术社区  · 14 年前

    我不知何故破坏了我的ruby配置,我不知道如何修复它。以下是irb会议:

    >> require 'ruby-debug'
    LoadError: dlsym(0x101a272d0, Init_ruby_debug): symbol not found - /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.bundle
            from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby_debug.bundle
            from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
            from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3/lib/ruby-debug-base.rb:1
            from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
            from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require'
            from /opt/local/lib/ruby/gems/1.8/gems/ruby-debug-0.10.3/cli/ruby-debug.rb:5
            from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require'
            from /opt/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `require'
            from (irb):1
    

    ruby 1.8.7 (2010-06-23 patchlevel 299) [i686-darwin10]
    

    我不知道该如何诊断和修复这个问题。有什么建议吗?我还应该提供什么信息?

    重新安装gem无法修复:

    $ sudo gem install ruby-debug 
    Password:
    Successfully installed ruby-debug-0.10.3
    1 gem installed
    Installing ri documentation for ruby-debug-0.10.3...
    Installing RDoc documentation for ruby-debug-0.10.3...
    
    2 回复  |  直到 14 年前
        1
  •  0
  •   rogerdpack Blair Conrad    14 年前

    也许它缺少了一些依赖关系。那么文件呢?我会在linux中使用ldd-l来确定这一点,不知道mac。

        2
  •  0
  •   cduhn    14 年前

    通过rvm重新安装了1.8.7,解决了这个问题。