Can't compile nginx with SSL support, OpenSSL not found

James Linton asked:

I’m trying to compile nginx from source with the SSL module enabled. When I run this command:

./configure --with-http_ssl_module

it does its usual checks to see if everything is installed correctly, and then this pops up:

checking for OpenSSL library … not found

./configure: error: SSL modules require the OpenSSL library. You can
either do not enable the modules, or install the OpenSSL library into
the system, or build the OpenSSL library statically from the source
with nginx by using –with-openssl= option.

I know for a fact that OpenSSL is installed, because when I do openssl version I get OpenSSL 1.0.1 14 Mar 2012

So I’m pretty stumped. I thought maybe OpenSSL isn’t isntalled in its default location, which is why nginx can’t find it, but I have no idea where this is as it came pre-installed with the server. How can I find out where this is?

The server is running Ubuntu 12.04 LTS.

Thanks.

My answer:


Most likely you’re missing the libssl-dev package.

But why not save yourself all the trouble and just use a PPA for nginx?


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.