You need to install OpenSSL using homebrew and tell homebrew to create the necessary symbolic links:
brew install openssl
brew link openssl
If you do not already have homebrew installed, you can get it by running this:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
And above all, if you have not installed Xcode and the Xcode command line tools:
xcode-select