Undefined symbol: SSLv3_method -... / openssl.so with Ruby and ArchLinux

A recent OpenSSL update on ArchLinux spoiled Ruby, because the latter depends on whether SSLv3 is supported first. Ruby code that uses OpenSSL will show the problem when they fail, as shown below:

openssl.so: undefined symbol: SSLv3_method - .../openssl.so (LoadError) 

I am using several versions of Ruby with RVM and the problem is related to all of them.

OpenSSL version I have a problem with 1.0.2h , but I believe that it was introduced using 1.0.2g . Version 1.0.2f works fine.

How can I solve the compatibility problem ( without downgradng OpenSSL )?

+7
ruby openssl rvm archlinux
source share
1 answer

The problem is caused by the fact that the ArchLinux OpenSSL package is built without SSLv3 support, with this commit . I believe this was done on other distributions such as Ubuntu.

The solution in the RVM environment is to reinstall your Rubies, which will rebuild them (you can also upgrade to the latest rvm):

 $ rvm get head # optional, if you want to! $ rvm reinstall all # or a specifc ruby version instead of 'all' 

However, old rubies will still fail with a compilation error as follows:

 Error running '__rvm_make -j1' ossl_ssl.c:143:27: error: 'SSLv3_client_method' undeclared here (not in a function) 

This was discussed with the RVM team who proposed installing this Ruby patch , which allows you to use older rubies to build:

 $ curl https://github.com/ruby/ruby/commit/801e1fe46d83c856844ba18ae4751478c59af0d1.diff > openssl.patch $ rvm install --patch ./openssl.patch 1.9.3-p194 

I built ruby-1.9.3-p194 , ruby-2.0.0-p247 and ruby-2.2.1 successfully with this patch.

+13
source share

All Articles