Error/Fix: ‘SSLv2_method’ undeclared here (not in a function)

When building ruby 1.9.2 on Ubuntu 11.10
Error:
ossl_ssl.c:110:1: error: ‘SSLv2_method’ undeclared here (not in a function)
ossl_ssl.c:111:1: error: ‘SSLv2_server_method’ undeclared here (not in a function)
ossl_ssl.c:112:1: error: ‘SSLv2_client_method’ undeclared here (not in a function)
make[1]: *** [ossl_ssl.o] Error 1
make[1]: Leaving directory `/home/username/.rvm/src/ruby-1.9.2-p180/ext/openssl’
make: *** [mkmain.sh] Error 1

Fix:
rvm pkg install openssl
rvm install ruby-1.9.2-p180 –with-openssl-dir=$rvm_path/usr