Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using RHEL 5.6 and trying to install stunnel with the 'xforwardfor' patch from haproxy to get a setup similar to this (older) post:

When I run ./configure I get the following error:

configure: **************************************** SSL
checking for SSL directory... Not found

Couldn't find your SSL library installation dir
Use --with-ssl option to fix this problem

From the stunnel documentation I need to pass a directory that has the ssl libraries (assuming ? ) as well as a 'certs' directory.

I've tried creating a /etc/openssl directory with a 'certs' directory and a symlink to /lib64/ but that didn't work.

What other libraries would I need ?


From the config.log:

It was created by stunnel configure 4.32, which was generated by GNU Autoconf 2.61. Invocation command line was

$ ./configure --with-ssl=/lib64

## --------- ##
## Platform. ##
## --------- ##

uname -m = x86_64
uname -r = 2.6.18-238.12.1.el5
uname -s = Linux
* snip *
configure:23977: **************************************** SSL
configure:23996: checking for SSL directory
configure:24019: result: Not found

And running ls /lib64 | grep ssl:

$ ls -l /lib64 | grep ssl
-rwxr-xr-x 1 root root  315032 Dec  7  2010
lrwxrwxrwx 1 root root      16 Jul 13 18:48 ->
share|improve this question
up vote 2 down vote accepted

I'm guessing you don't have openssl-devel installed.

Here is the stunnel-4.42 configure output I got on a RHEL5.6 server:

**************************************** SSL
checking for SSL directory... /usr/
checking for obsolete RSAref library... no
checking /usr//include/openssl/engine.h usability... yes
checking /usr//include/openssl/engine.h presence... yes
checking for /usr//include/openssl/engine.h... yes

The function check_ssl_dir in configure is looking for /usr/include/openssl/ssl.h which is part of openssl-devel.

Do not pass any options to configure, do any directory creation, or make any symlinks.

share|improve this answer
I was just coming to post this exact answer. I just found out about the openssl-devel package. Thanks! – DTest Aug 2 '11 at 18:41

The certificates live in /etc/openssl and 64 bit software libraries in /lib64. You should not mix those. Assuming that you are on a 64 bit platform and the library exists in /lib64, try this:

./configure --with-ssl=/lib64

...and if it does not work, post the relevant part of "config.log" file to assist you further.

share|improve this answer
Thanks for the response. /etc/openssl doesn't exist on my platform (but openssl is installed). The stunnel link states that the ssl library directory should have the 'certs' directory...why is it a bad idea to mix them using symlinks? I added my config.log and ssl-related /lib64 libraries. – DTest Aug 2 '11 at 18:16

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.