Fix issues with Ruby installation (via rvm) in Ubuntu 15.10

Nov 11, 2015, 10:18:35 AM

ruby Got an error while trying to install Ruby via RVM and RBENV on Ubuntu 15.10.

compiling ossl_ssl.c
ossl_ssl.c:141:27: error: ‘SSLv3_method’ undeclared here (not in a function)
Makefile:293: recipe for target 'ossl_ssl.o' failed
make[2]: *** [ossl_ssl.o] Error 1
... recipe for target 'ext/openssl/all' failed
make[1]: *** [ext/openssl/all] Error 2
make: *** [build-ext] Error 2

Solution #1

Apply patch during installation

curl -fsSL | rbenv install --patch 2.2.3

Solution #2

rvm pkg install openssl  
rvm install 2.2.2 --with-openssl-dir=$HOME/.rvm/usr
rvm --default use 2.2.2 

Fix certificates issue for solution #2

My code with HTTP requests to HTTPS sites returned me an error like this
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (I think that solution above is the reason).

And this another fix helped

rmdir ~/.rvm/usr/ssl/certs
$ ln -s /etc/ssl/certs ~/.rvm/usr/ssl
comments powered by Disqus
Kuzminov "iJackUA"
Web Team Lead
at MobiDev (Kharkiv, Ukraine)
Code in Ruby and Elixir, but still love PHP. Explore ES6 and Vue.js. Explore databases, use Ubuntu and MacOS, think about IT people and management


Skaffold tool that facilitates continuous development for Kubernetes-native applications. Continuously deploys to your local or remote Kubernetes cluster.

DoItLive is a tool for live presentations in the terminal. It reads a file of shell commands and replays the commands in a fake terminal session as you type random characters.