2

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

系统环境: OS:MacOS 10.8.2 Mountain Lion 编译环境: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:</p>

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

但是当我运行时遇到了同样的错误bundle

https://gist.github.com/4704589

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


现在我rvm use system也破产了:</p>

─(⚡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 时,完全没有问题。

有什么帮助吗?

4

3 回答 3

2

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

TL;博士

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

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

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

于 2013-06-25T20:35:02.897 回答
1

这就是我设法用 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]

更多评论:https ://gist.github.com/iboard/5023717

于 2013-02-24T15:21:00.680 回答
0

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

于 2013-02-18T16:06:35.020 回答