passenger: passenger-install-apache2-module fails with OpenSSL development headers not found on OSX El Capitan

After upgrading to El Capitan I’m unable to install the Apache module by running passenger-install-apache2-module.

I’m getting this error: * Checking for OpenSSL development headers... Found: no

There’s for sure a default installation of OpenSSL on the system, also tried installing the latest one (OpenSSL 1.0.2d 9 Jul 2015) to /opt/local/bin/openssl but that did not help at all. Still the same problem.

How can I point to the correct path?

About this issue

  • Original URL
  • State: closed
  • Created 9 years ago
  • Comments: 53 (15 by maintainers)

Commits related to this issue

Most upvoted comments

brew install openssl
brew link openssl --force
brew install openssl
ln -s /usr/local/Cellar/openssl/1.0.2c/include/openssl /usr/local/include/openssl

For those that use homebrew, you can simply install openssl using homebrew.

brew install openssl

Make sure that you have updated XCode and agreed to the license and then run

xcode-select --install

Then you can simply run the following with the included environment variables

export EXTRA_CFLAGS=-I/usr/local/opt/openssl/include && export EXTRA_CXXFLAGS=-I/usr/local/opt/openssl/include & export EXTRA_LDFLAGS=-L/usr/local/opt/openssl/lib & passenger-install-apache2-module

@CamJN thank you but I was able to figure out the problem. First is the issue with internal package which is resolved by adding this to ./configure

--with-cc-opt="-I/usr/local/opt/openssl/include" \
--with-ld-opt="-L/usr/local/opt/openssl/lib"

Another one is disabling csrutil for some reason after update it was enabled for me again. But of course I wouldn’t recommend anyone to do that if they don’t know what they are doing.

xcode-select --install

Did it for me 😃

Amazingly I came across this issue in 2021 still. I checked where passenger was looking for open ssl by passing the VERBOSE = 1 option after that I linked openssl to one of the folders listed: sudo ln -s /opt/homebrew/opt/openssl@1.1/include/openssl /opt/local/include/openssl