【问题标题】:OpenSSL error got when install Ruby 2.0.0 via RVM and Rbenv通过 RVM 和 Rbenv 安装 Ruby 2.0.0 时出现 OpenSSL 错误
【发布时间】:2013-01-18 17:56:26
【问题描述】:

我正在尝试安装 Ruby 2.0.0-rc1,但遇到 OpenSSL 错误。

系统环境: 操作系统:MacOS 10.8.2 山狮 编译ENV:Xcode CommandTools 4.6 xcode46cltools_10_86938131a.dmg

RVM 分期付款:

rvm get head
brew install openssl
rvm reinstall 2.0.0 --with-openssl-dir=`brew --prefix openssl`

我尝试了 RVM pkg:

rvm pkg install openssl
rvm reinstall 2.0.0 --with-openssl-dir=$HOME/.rvm/usr

但是当我运行bundle时出现同样的错误:

https://gist.github.com/4704589

请注意,这不是认证错误。 我用谷歌搜索了很多,但没有人得到同样的错误。


现在我的rvm use system也坏了:

─(⚡refactory/test_for_git_server)─( ̄▽ ̄)~*>rvm use system
Now using system ruby.
─(⚡refactory/test_for_git_server)─( ̄▽ ̄)~*>which ruby
/Users/ranmocy/.rvm/rubies/ruby-2.0.0-rc1/bin/ruby

rbenv 也出错了:

https://gist.github.com/4704619


但是当我手动从源代码编译ruby 2.0.0-rc1时,完全没有问题。

有什么帮助吗?

【问题讨论】:

    标签: openssl rvm rbenv ruby-2.0


    【解决方案1】:

    这看起来像 clang 问题,请参阅我描述该问题的其他答案 - https://stackoverflow.com/a/14594287/497756

    【讨论】:

      【解决方案2】:

      这就是我设法用 rvm 和 MacOSX 10.8 编译 ruby​​2 的方法

      导出 CC=/usr/bin/gcc rvm pkg 安装 openssl rvm install ruby​​-head --with-gcc=clang --verify-downloads 1 # 见 * rvm 使用红宝石头 红宝石-v # => ruby​​ 2.0.0dev (2013-02-24) [x86_64-darwin12.2.0]

      更多的cmets在:https://gist.github.com/iboard/5023717

      【讨论】:

        【解决方案3】:

        哦,我今天也遇到了类似的问题,并且学习了一些关于 pkg-config 的知识,这是一个描述库安装的精彩系统。作为回报这种解释的一种方式,I wrote about it

        TL;DR

        将此添加到您的 shell 启动文件(例如 ~/.bash_profile 或 ~/.zshrc)。然后再次运行安装。

        export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/lib/pkgconfig
        

        这使得配置脚本可以找到未损坏的 OpenSSL。

        【讨论】:

          猜你喜欢
          • 2013-06-15
          • 2013-07-11
          • 1970-01-01
          • 2016-08-21
          • 1970-01-01
          • 1970-01-01
          • 2021-07-02
          • 2013-03-09
          • 2018-03-23
          相关资源
          最近更新 更多