4
votes

I've installed OpenSSL with rvm (rvm pkg install openssl) and then did rvm reinstall 1.9.3 --with-openssl-dir=$rvm_path/usr

When I try to run the thin webserver, I get the following error:

/home/ubuntu/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/x86_64-linux/openssl.so: undefined symbol: SSLv2_method - /home/ubuntu/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/x86_64-linux/openssl.so (LoadError)

This is running on Ubuntu 12.04, and I've read that Ubuntu 12 builds OpenSSL without SSLv2 support. Yet, here it's referencing RVM's package -- does RVM do the same? Is there any known workaround for this problem?

1
I've hit exactly the same issue. Did you find a solution? - user1158559
I think it would be fixed if you could install a particular version of the openssl pkg - I believe 0.9.8 might be what you want. - user1158559
Not sure how to do this, but rvm version 1.14.7's openssl package version is 0.9.8t. I'll let you know if it works when i've recompiled ruby. - user1158559
did it work for you..? I ended up using CentOS - joslinm
Yeah it did! Now I'm going to post an answer and claim some upvotes! - user1158559

1 Answers

4
votes

As you say, Ubuntu builds openssl without SSLv2 support: Ubuntu and undefined symbol for SSLv2_method

For people reading this, your options are (in increasing difficulty):

(1) install rvm version 1.14.7, where the openssl pkg includes openssl version 0.9.8, and includes SSLv2 support by default.

rvm implode # Completely destroy your rvm installation
curl -L https://get.rvm.io | bash -s -- --version 1.14.7

Install the required packages, recompile your ruby, and it should work!

(2) (This gives you more security): Compile your own openssl from source, configuring it to include SSLv2 support, then recompile your ruby with the --with-openssl-dir pointing at wherever you installed openssl to.

(3) Fix thin so that it no longer requires the SSLv2_method symbol, then submit a pull request on GitHub