Nginx Cannot Find OpenSSL Development Headers
If brew link openssl --force
gives you this message:
Warning: Refusing to link: openssl Linking keg-only openssl means you may end up linking against the insecure, deprecated system OpenSSL while using the headers from Homebrew's openssl. Instead, pass the full include/library paths to your compiler e.g.: -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib
Try this:
$ brew doctor (now fix anything that it tells you to fix)$ brew update$ brew upgrade
Now let's install it:
$ brew install openssl
And now we'll link it into our public area so you don't have to figure out the magic environment variable to set while building your favorite OpenSSL-backed library:
$ cd /usr/local/include$ ln -s ../opt/openssl/include/openssl .
All done! Enjoy
If you are on Mac OS X El Capitan, Apple doesn't include openssl any more because of security problems openssl had, I have similar problem installing Passenger. brew just installs openssl itself without development headers.
If you are on an older version of Mac OS X than El Capitan, you can use:xcode-select --install
which installs openssl development headers as well.
EDIT:
Updating brew and installing openssl and force linking openssl to brew version solved my problem:
$ brew update $ which openssl /usr/bin/openssl $ brew install openssl$ brew link openssl --force $ which openssl /usr/local/bin/openssl