# Configure can't find SSL library

**URL:** <https://www.ruby-forum.com/t/configure-cant-find-ssl-library/192669>\
**Category:** NGINX\
**Created:** [August 3, 2010, 8:24pm UTC](https://www.ruby-forum.com/t/configure-cant-find-ssl-library/192669 "2010-08-03T20:24:21Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WilliamOMS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/839c29/32.png) [@WilliamOMS](https://www.ruby-forum.com/u/WilliamOMS)\
**Post date:** [August 3, 2010, 8:24pm UTC](https://www.ruby-forum.com/t/configure-cant-find-ssl-library/192669/1 "2010-08-03T20:24:21Z")

</div>

Hello,

I’m installing Nginx 0.8.40 on Solaris 10 with SSL module enabled. But  
configure command (./configure --prefix=/export/home/tomcat/nginx  
–with-http\_ssl\_module) failed with following messages in autoconf.err.

=========================  
checking for OpenSSL library

## objs/autotest.c:4:25: openssl/ssl.h: No such file or directory

#include  
#include  
#include

int main() {  
SSL\_library\_init();  
return 0;  
}

* * *

# gcc -D\_FILE\_OFFSET\_BITS=64 -lsocket -lnsl -o objs/autotest objs/autotest.c -lssl -lcrypto

I have installed openSSL and is available on the PATH.  
OpenSSL\> version  
OpenSSL 0.9.7d 17 Mar 2004

Do I need to specify some kind environment variable for SSL library?  
What’s the default path Nginx will look for OpenSSL library?

Thanks,  
William

Posted at Nginx Forum:

> **[Configure can't find SSL library](https://forum.nginx.org/read.php?2,116221,116221#msg-116221)**
>
> Hello, I'm installing Nginx 0.8.40 on Solaris 10 with SSL module enabled. But configure command (./configure --prefix=/export/home/tomcat/nginx --with-http\_ssl\_module) failed with following messages in autoconf.err. ========================= checking...

---

<div class="post-metadata">

**Author:** ![WilliamOMS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/839c29/32.png) [@WilliamOMS](https://www.ruby-forum.com/u/WilliamOMS)\
**Post date:** [August 3, 2010, 8:48pm UTC](https://www.ruby-forum.com/t/configure-cant-find-ssl-library/192669/2 "2010-08-03T20:48:22Z")

</div>

On Tue, Aug 03, 2010 at 02:23:34PM -0400, WilliamOMS wrote:

> objs/autotest.c:4:25: openssl/ssl.h: No such file or directory
> 
> * * *
> 
> # gcc -D\_FILE\_OFFSET\_BITS=64 -lsocket -lnsl -o objs/autotest objs/autotest.c -lssl -lcrypto
> 
> I have installed openSSL and is available on the PATH.  
> OpenSSL\> version  
> OpenSSL 0.9.7d 17 Mar 2004

What does “which openssl” show ?

> Do I need to specify some kind environment variable for SSL library?

You may try  
./configure --with-cc-opt=“-I /path/to/includes”  
–with-ld-opt=“-L /path/to/libraries”

> What’s the default path Nginx will look for OpenSSL library?

As opposite to PCRE library, nginx does not try to search OpenSSL  
in several places. It’s usually /usr/include and /usr/lib.

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![WilliamOMS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/839c29/32.png) [@WilliamOMS](https://www.ruby-forum.com/u/WilliamOMS)\
**Post date:** [August 3, 2010, 9:39pm UTC](https://www.ruby-forum.com/t/configure-cant-find-ssl-library/192669/3 "2010-08-03T21:39:20Z")

</div>

Thanks a lot for the quick response. After specifying -I and -L for  
OpenSSL includes and library, it found the SSL library, although I still  
can see there are some error messages in autoconf.err.

make and make install seem working too. I didn’t spot any error in the  
console.

But when I was trying to start nginx, it immediately print out following  
and failed.

ld.so.1: nginx: fatal: libpcre.so.0: open failed: No such file or  
directory  
Killed

William

## Igor S. Wrote:

> messages in autoconf.err.
> 
> > #include  
> > objs/autotest.c -lssl -lcrypto  
> > variable for SSL library?  
> > As opposite to PCRE library, nginx does not try to  
> > nginx mailing list  
> > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,116221,116254#msg-116254](http://forum.nginx.org/read.php?2,116221,116254#msg-116254)

---

<div class="post-metadata">

**Author:** ![WilliamOMS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/839c29/32.png) [@WilliamOMS](https://www.ruby-forum.com/u/WilliamOMS)\
**Post date:** [August 3, 2010, 10:08pm UTC](https://www.ruby-forum.com/t/configure-cant-find-ssl-library/192669/4 "2010-08-03T22:08:37Z")

</div>

On Tue, Aug 03, 2010 at 03:38:27PM -0400, WilliamOMS wrote:

> ld.so.1: nginx: fatal: libpcre.so.0: open failed: No such file or  
> directory  
> Killed

Then

./configure --with-cc-opt=“-I/path/to/includes”  
–with-ld-opt=“-R/path/to/lib -L/path/to/lib”

> > –prefix=/export/home/tomcat/nginx
> > 
> > > gcc -D\_FILE\_OFFSET\_BITS=64 -lsocket -lnsl -o
> > 
> > OpenSSL library?
> 
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**

---

<div class="post-metadata">

**Author:** ![WilliamOMS](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/839c29/32.png) [@WilliamOMS](https://www.ruby-forum.com/u/WilliamOMS)\
**Post date:** [August 4, 2010, 12:32am UTC](https://www.ruby-forum.com/t/configure-cant-find-ssl-library/192669/5 "2010-08-04T00:32:39Z")

</div>

## Igor S. Wrote:

> > make and make install seem working too. I didn’t  
> > Killed
> 
> Then
> 
> ./configure --with-cc-opt=“-I/path/to/includes”  
> –with-ld-opt=“-R/path/to/lib  
> -L/path/to/lib”

This finally worked! nginx started. Thank you so much!

> > > > I’m installing Nginx 0.8.40 on Solaris 10  
> > > > checking for OpenSSL library  
> > > > SSL\_library\_init();  
> > > > the  
> > > > ./configure --with-cc-opt="-I  
> > > > in several places. It’s usually /usr/include  
> > > > nginx mailing list  
> > > > [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> > > > [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)
> 
> –  
> Igor S.  
> [Igor Sysoev](http://sysoev.ru/en/)
> 
> * * *
> 
> nginx mailing list  
> [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [mailman.nginx.org archive](http://nginx.org/mailman/listinfo/nginx)

Posted at Nginx Forum:  
[http://forum.nginx.org/read.php?2,116221,116278#msg-116278](http://forum.nginx.org/read.php?2,116221,116278#msg-116278)
