4

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?

joslinm
  • 7,845
  • 6
  • 49
  • 72

1 Answers1

4

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

Community
  • 1
  • 1
user1158559
  • 1,954
  • 1
  • 18
  • 23
  • 1
    from the bottom of my cold, developer heart: thank you. I didn't have this exact problem, but your solution #1 was exactly what I needed. – Nathan Colgate Nov 29 '12 at 21:26