What's up with my gem install? symbol SSLv2_method, version OPENSSL_1.0.0 not defined

Ever met this guy?

1
2
3
4
ERROR:  Loading command: install (LoadError)
  /usr/lib/x86_64-linux-gnu/ruby/2.1.0/openssl.so: symbol SSLv2_method, version OPENSSL_1.0.0 not defined in file libssl.so.1.0.0 with link time reference - /usr/lib/x86_64-linux-gnu/ruby/2.1.0/openssl.so
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

I have encountered it in a bunch of docker containers that are running ubuntu and doing a gem install. Looks like we’re trying to install a ruby / rubygems version that’s not compatible with the pre-configured OpenSSL shipped on our Ubuntu machine — so the easy fix is:

1
2
apt-get update
apt-get install openssl

which will upgrade OpenSSL.

An alternative method (thanks to Mohamed):

1
apt-get install -y libssl-dev

which I assume takes care of updating OpenSSL as well.

Cheers!


Hi there! I recently wrote an ebook on web application security, currently sold on leanpub, the Amazon Kindle store and gumroad.

It contains 160+ pages of content dedicated to securing web applications and improving your security awareness when building web apps, with chapters ranging from explaining how to secure HTTP cookies with the right flags to understanding why it is important to consider joining a bug bounty program.

Feel free to skim through some of the free chapters published on this blog and, if the content seems interesting enough to you, grab a copy on leanpub, the Amazon Kindle store, gumroad or simply checkout right down below!

Buy the Web Application Security ebook for $6.99

In the mood for some more reading?

...or check the archives.