如何重新编译Ruby和OpenSSL?

时间:2021-03-18 07:23:16

I'm currently setting up a server with no provisioning tool for production. The server is RHEL 6.5 and we're using Ruby 2.1.4. The server doesn't manage Rubies via rbenv or rvm.

我目前正在设置一个服务器,没有提供生产工具。服务器是RHEL 6.5,我们使用的是Ruby 2.1.4。服务器不通过rbenv或rvm管理红宝石。

The problem is that when I try to do a bundle install, I'm getting this OpenSSL issue.

问题是,当我尝试进行捆绑安装时,我得到了这个OpenSSL问题。

Could not load OpenSSL.
You must recompile Ruby with OpenSSL support or change the sources in your
Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL
using RVM are available at http://rvm.io/packages/openssl.

In the Gemfile, we're using our own source for gems: source 'http://gems.ourhost.org/'.

在Gemfile中,我们使用自己的gem源:source 'http://gems.ourhost.org/'。

I was wondering if someone already had the same problem. Any help is appreciated.

我想知道是否有人也有同样的问题。任何帮助都是感激。

1 个解决方案

#1


2  

SSLv3 has been disabled in upstream OpenSSL, so I had to reinstall my ruby versions that don't have a patch for this with the patch that enables functioning with SSLv3 disabled. The patch is here. Here's what I did, using RVM (I know you said you don't use it, so you could just install ruby from source but patch this first):

SSLv3在上游OpenSSL中已经被禁用,所以我不得不重新安装我的ruby版本,因为这个补丁不能使用SSLv3禁用的补丁。补丁在这里。下面是我使用RVM所做的事情(我知道你说过不使用它,所以你可以从源代码中安装ruby,但是先修补一下):

wget https://github.com/ruby/ruby/commit/801e1fe46d83c856844ba18ae4751478c59af0d1.diff -O openssl.patch
rvm reinstall --patch openssl.patch 2.2.3

There's some more info on this github issue, as well as people reporting success with different versions.

关于github的问题,还有更多的信息,以及人们对不同版本的成功报告。

#1


2  

SSLv3 has been disabled in upstream OpenSSL, so I had to reinstall my ruby versions that don't have a patch for this with the patch that enables functioning with SSLv3 disabled. The patch is here. Here's what I did, using RVM (I know you said you don't use it, so you could just install ruby from source but patch this first):

SSLv3在上游OpenSSL中已经被禁用,所以我不得不重新安装我的ruby版本,因为这个补丁不能使用SSLv3禁用的补丁。补丁在这里。下面是我使用RVM所做的事情(我知道你说过不使用它,所以你可以从源代码中安装ruby,但是先修补一下):

wget https://github.com/ruby/ruby/commit/801e1fe46d83c856844ba18ae4751478c59af0d1.diff -O openssl.patch
rvm reinstall --patch openssl.patch 2.2.3

There's some more info on this github issue, as well as people reporting success with different versions.

关于github的问题,还有更多的信息,以及人们对不同版本的成功报告。