Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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.


share|improve this question

2 Answers 2

up vote 5 down vote accepted

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

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

share|improve this answer
Just what I was about to say. You were faster :) –  Christopher Perrin Aug 11 '12 at 18:20
What exactly are PPA's? From what I can gather people can upload packages to be installed using apt-get? I thought the best way to ensure I was always getting the latest version of software was to compile it from the source from the website. –  James Linton Aug 11 '12 at 18:42
PPAs are Personal Package Archives. As you said, they are to distribute dpkg packages. Compiling from source might get you the newest version but this is not always necessary. Information for Ubuntu and the PPA can be found here: wiki.nginx.org/Install#Official_Debian.2FUbuntu_packages –  Christopher Perrin Aug 11 '12 at 19:29
The info on the nginx wiki is good. It will eventually lead you to the PPA that I linked. :) –  Michael Hampton Aug 11 '12 at 19:43
Alright thanks, I'll look into using PPA's in the future. But for this problem, installing libssl-dev worked. :) –  James Linton Aug 11 '12 at 21:05

In case you want to check that libssl is installed in the right place, you can type which openssl and then ldd /path/to/openssl.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.