本文介绍了在Mac 10.10 Yosemite上安装Ruby OpenSSL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用brew我经过正常的安装过程来安装rbenv和Ruby.一切都进行得很顺利,但是很明显,Ruby并没有在板载openssl上安装.

Using brew I go though the normal install process to get rbenv and Ruby installed.Everything goes smoothly but it is soon apparent Ruby did not install with openssl onboard.

似乎唯一允许rbenv在ruby安装过程中自动安装openssl的方法是:

The only thing that seems to allow rbenv to auto install openssl during the ruby install is to use this:

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include /usr/include

这是rbenv或brew中的错误,需要修复吗?

Is this a bug in rbenv or brew that needs fixing?

推荐答案

在Github上与openssl有关rbenv的话题很长此处

There's a long thread about rbenv with openssl on Github here

最简单的解决方法是:

1)更新到rbenv的最新版本,在该版本中他们修复了CONFIGURE_OPTS选项,然后删除并重新构建所有红宝石版本.

1) Update to the latest version of rbenv where they fixed the CONFIGURE_OPTS options, then delete and re-build all your ruby versions.

2)使用旧版本的rbenv并明确设置CONFIGURE_OPTS以使用brew openssl:

2) Use the older version of rbenv and explictly set the CONFIGURE_OPTS to use the brew openssl:

CONFIGURE_OPTS="--with-openssl-dir=`brew --prefix openssl`" rbenv install <whatever version you need>

这篇关于在Mac 10.10 Yosemite上安装Ruby OpenSSL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 18:52