我正在尝试使用自制软件对openssl进行一些更新,但我设法破坏了一切。我现在无法做任何事情,这是我尝试进行捆绑安装时得到的结果:
$ bundle install
/Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle, 9): Symbol not found: _SSLv2_client_method (LoadError)
Referenced from: /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
Expected in: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
in /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle - /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin13.0/openssl.bundle
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/openssl.rb:17:in `<top (required)>'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/security.rb:11:in `<top (required)>'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/package.rb:43:in `<top (required)>'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/dependency_installer.rb:3:in `<top (required)>'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/installer.rb:2:in `<top (required)>'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/cli/install.rb:78:in `run'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/cli.rb:146:in `install'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/vendor/thor/command.rb:27:in `run'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/vendor/thor/invocation.rb:121:in `invoke_command'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/vendor/thor.rb:363:in `dispatch'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/vendor/thor/base.rb:440:in `start'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/cli.rb:9:in `start'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/bin/bundle:20:in `block in <top (required)>'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/lib/bundler/friendly_errors.rb:5:in `with_friendly_errors'
from /Users/asServer/.rbenv/versions/2.1.2/lib/ruby/gems/2.1.0/gems/bundler-1.6.3/bin/bundle:20:in `<top (required)>'
from /Users/asServer/.rbenv/versions/2.1.2/bin/bundle:23:in `load'
from /Users/asServer/.rbenv/versions/2.1.2/bin/bundle:23:in `<main>'
答案 0 :(得分:287)
我刚刚在我的系统上修复了类似的问题。您需要重建Ruby 2.1.2的安装,它将重新链接新更新的SSL。
$ rbenv install 2.1.2
rbenv: /Users/ryan/.rbenv/versions/2.1.2 already exists
continue with installation? (y/N) y
Downloading ruby-2.1.2.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/f22a6447811a81f3c808d1c2a5ce3b5f5f0955c68c9a749182feb425589e6635
Installing ruby-2.1.2...
Installed ruby-2.1.2 to /Users/ryan/.rbenv/versions/2.1.2
答案 1 :(得分:185)
升级openssl后我遇到了类似的问题。我用rvm。我盯着升级rvm。
$ rvm get stable
我接下来重新安装了1.9.3。
rvm reinstall ruby-1.9.3-p545
重新安装后,我跑了:
$ rvm gemset pristine
如果您发现恢复gemset时出现任何错误,最好的选择是清空gemset并重建它。
rvm gemset use mygemset
rvm gemset empty mygemset
gem install bundler
bundle install
如果您有多个宝石集,则必须为每个宝石集重复这些步骤。
答案 2 :(得分:17)
在rvm
下有1.9.3-p547的相同问题rvm reinstall ruby-1.9.3-p547
Ruby已重新安装,但无法为应用程序设置gemset_pristine
,因为
libv8 version 3.16.14.3 failed
这就是我首先达到这一点的原因。恶意挫折圈......
<强>更新强>
检查您的平台版本。 I have for example Darwin 10.8 and that is not listed here。
因此,除非您的libv8 gem版本具有适用于您的平台的预编译二进制文件,否则将需要很长(很长)的时间。出去吃饭,看电影,放松一下......如果有足够的问题,也许他们会设置一个二元发行版......
答案 3 :(得分:14)
有同样的错误并通过brew upgrade openssl
答案 4 :(得分:6)
对于2.1.2我有同样的问题,Ryan Dlugosz的优秀答案还远远不够。我的问题是我安装了多个版本的openssl(我想我已经通过brew
和 git
安装了以前的项目。
我必须删除/ opt / local / bin / openssl然后重建2.1.2。
$ rbenv global
2.1.2
$ which -a openssl
/opt/local/bin/openssl
/opt/local/bin/openssl
/usr/bin/openssl
$ sudo rm -rf /opt/local/bin/openssl
$ rbenv install -f 2.1.2
Downloading openssl-1.0.1g.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/53cb818c3b90e507a8348f4f5eaedb05d8bfe5358aabb508b7263cc670c3e028
Installing openssl-1.0.1g...
Installed openssl-1.0.1g to /Users/globber/.rbenv/versions/2.1.2
Downloading ruby-2.1.2.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/f22a6447811a81f3c808d1c2a5ce3b5f5f0955c68c9a749182feb425589e6635
Installing ruby-2.1.2...
Installed ruby-2.1.2 to /Users/globber/.rbenv/versions/2.1.2
答案 5 :(得分:5)
删除RVM
安装RVM,Rail
$ curl -L https://get.rvm.io | bash -s
$ rvm稳定了 $ rvm要求
$ rvm install 2.0.0 --with-openssl-dir = $ HOME / .rvm / usr
$ rvm使用2.0.0 $ gem update --system 2.0.3
$ gem install rails --version 4.0.5
答案 6 :(得分:4)
rbenv用户:
它有助于确保您使用的是正确版本的ruby。如果您重新安装rbenv或安装新的ruby,请更改为刚刚安装的ruby版本:
$ rbenv local 2.1.3
答案 7 :(得分:1)
如果它可以帮助任何人:我安装了更新版本的Ruby(2.1.2),并且在我的.ruby-version文件中我引用了旧版本(2.0.0-p353)
将我的.ruby-version文件更改为2.1.2为我解决了这个问题。
答案 8 :(得分:1)
我有类似的问题,在升级到ruby 2.2.2后发生。 但是,我的环境有点不同,导致上述解决方案无效。
我正在使用:
以下命令在我的情况下解决了这个问题:
> sudo ruby-install -r /opt/rubies ruby 2.2.2 -- --with-openssl-dir=/usr/local/opt/openssl
> gem install bundler
> bundler install
答案 9 :(得分:0)
除了上面的验收答案,您可能必须告诉rbenv使用新安装的版本。例如,我在〜/ .rbenv / version中有旧版本,因此rbenv总是使用旧版本。在该文件中(或通过命令行)手动设置新版本应解决问题。
rbenv install -f 2.1.2
rbenv versions
rbenv global 2.1.2 //sets global version to 2.1.2