Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Nginx Cannot Find OpenSSL Development Headers

When I run: rvmsudo passenger-install-nginx-module on my Mac to install nginx, the terminal prints:

Checking for OpenSSL development headers...
  Found: no

But I am certain I have openssl installed. which openssl returns /usr/local/openssl/bin/openssl and /usr/local/openssl/bin: is the first entry in my $PATH. My questions are:

  • Are the OpenSSL development headers included with the regular openssl install through homebrew?
  • If they aren't, where should I download them from?
like image 668
Ethan Keller Avatar asked Oct 06 '15 00:10

Ethan Keller


1 Answers

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

like image 168
A H K Avatar answered Sep 27 '22 21:09

A H K