【问题标题】:Gem install error due to invalid ssl using rbenv由于使用 rbenv 的 ssl 无效,Gem 安装错误
【发布时间】:2014-10-06 04:20:29
【问题描述】:

我正在尝试安装新的 gem (gem install lunchy),但由于 ssl 证书而出现以下错误:

ERROR: Loading command: install (LoadError) dlopen(/usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle, 9): Symbol not found: _SSLv2_client_method Referenced from: /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle Expected in: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib in /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle - /usr/local/Cellar/ruby/2.0.0-p247/lib/ruby/2.0.0/x86_64-darwin12.3.0/openssl.bundle ERROR: While executing gem ... (NoMethodError) undefined method 'invoke_with_build_args' for nil:NilClass

我尝试了许多修复方法:

按照这个答案bundle install fails with SSL certificate verification error 尝试了gem update --system,但在该命令上得到了同样的错误。

根据这个问题尝试了brew install openssl,然后是brew link openssl --force,但无济于事:OpenSSL error installing ruby 2.0.0-p195 on Mac with rbenv

即使尝试重新安装 rbenv 和 ruby​​,但也没有用,仍然出现同样的错误。

【问题讨论】:

    标签: ruby ssl gem rubygems homebrew


    【解决方案1】:

    在这个错误中执行的 Ruby 不是 rbenv 安装的,而是 Homebrew 安装的。

    如果您尝试使用rbenv,可以运行brew uninstall ruby 和/或检查echo $PATH 的输出以确保~/.rbenv/shims 位于开头。

    【讨论】:

      猜你喜欢
      • 2011-02-21
      • 1970-01-01
      • 2021-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-04-08
      • 2016-05-02
      • 1970-01-01
      相关资源
      最近更新 更多