新手问题 bundle install 失败,原因是 “Symbol not found: _SSLv2_client_method”

barry · 2015年09月06日 · 最后由 chenge 回复于 2015年09月06日 · 5114 次阅读

如下图,在 bundle install 总是失败,原因是“Symbol not found: _SSLv2_client_method” Google 了下解决方法,基本都是重装 openssl 和 ruby,然而并没有什么用。希望各位前辈朋友可以有好的解决办法。

已经尝试的解决方法: brew rm openssl brew cleanup openssl brew install openssl rvm reinstall ruby

$ bundle install
Error loading RubyGems plugin "/Users/mac/.rvm/gems/ruby-2.0.0-p481@global/gems/executable-hooks-1.3.2/lib/rubygems_plugin.rb": dlopen(/Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle, 9): Symbol not found: _SSLv2_client_method
  Referenced from: /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle
  Expected in: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
 in /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle - /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle (LoadError)
/Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle, 9): Symbol not found: _SSLv2_client_method (LoadError)
  Referenced from: /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle
  Expected in: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
 in /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle - /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/x86_64-darwin12.4.0/openssl.bundle
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/2.0.0/openssl.rb:17:in `<top (required)>'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/security.rb:11:in `<top (required)>'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/package.rb:43:in `<top (required)>'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/dependency_installer.rb:3:in `<top (required)>'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mac/.rvm/rubies/ruby-2.0.0-p481/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/lib/bundler/installer.rb:2:in `<top (required)>'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/lib/bundler/cli/install.rb:107:in `run'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/lib/bundler/cli.rb:162:in `install'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/lib/bundler/cli.rb:10:in `start'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/bin/bundle:20:in `block in <top (required)>'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/lib/bundler/friendly_errors.rb:7:in `with_friendly_errors'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/gems/bundler-1.10.6/bin/bundle:18:in `<top (required)>'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/bin/bundle:23:in `load'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/bin/bundle:23:in `<main>'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/mac/.rvm/gems/ruby-2.0.0-p481@railstutorial_rails_4_0/bin/ruby_executable_hooks:15:in `<main>'

这错误不太看得出来是什么问题。。。

rvm 删除掉,然后按照 wiki 安装,试试看吧。

需要 登录 后方可回复, 如果你还没有账号请 注册新账号