Skip to content

Instantly share code, notes, and snippets.

@jordanbyron
Last active August 29, 2015 14:04
Show Gist options
  • Save jordanbyron/3e2c79b2798b8b294b17 to your computer and use it in GitHub Desktop.
Save jordanbyron/3e2c79b2798b8b294b17 to your computer and use it in GitHub Desktop.
Installing Ruby 2.1.2 w/ OpenSSL 1.0.1h
  1. Download & extract openssl-1.0.1h
cd ~/src
wget http://www.openssl.org/source/openssl-1.0.1h.tar.gz
tar -xzvf openssl-1.0.1h.tar.gz
cd openssl-1.0.1h
  1. Configure OpenSSL
./config --openssldir=/usr/local/openssl shared zlib-dynamic

NOTE: --openssldir option is optional. Default is /usr/local/ssl which works just fine

  1. Make and install OpenSSL
make
make test
sudo make install
  1. Download & extract ruby-2.1.2
cd ~/src
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.2.tar.gz
tar -xzvf ruby-2.1.2.tar.gz
cd ruby-2.1.2
  1. Configure Ruby
export LD_LIBRARY_PATH=/usr/local/openssl/lib
./configure --prefix=/opt/rubies/ruby-2.1.2 --enable-shared --with-openssl-dir=/usr/local/openssl
  1. Make and install Ruby
make
make test
sudo make install
  1. Profit 💸

moneymoneymoney

You know, for the google
libcrypto.a(x86_64-gcc.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
ssl/lib/libcrypto.a: could not read symbols: Bad value
collect2: ld returned 1 exit status make[2]: *** [../../../.ext/x86_64-linux/digest/md5.so] Error 1 make[2]: Leaving directory `/usr/local/src/ruby-2.1.2/ext/digest/md5'
openssl_missing.h:71: error: conflicting types for ‘HMAC_CTX_copy’
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment