OpenSSL not found during ./configure

I'm trying to make one bitcoin-like daemon on my Ubuntu 14.04.3. When I hit ./configure:

checking for SSL... no
configure: error: openssl  not found.

but

# apt-get install libssl-dev linux-headers-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl-dev is already the newest version.
linux-headers-3.13.0-61-generic is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I googled the error message but I haven't any idea what to do. I successfully maked exactly that one daemon on my other Ubuntu 14.04 so the sources and configuration scripts are good.

UPD1. Installing openssl didn't help:

# apt-get install openssl
..
openssl is already the newest version.
..

I've checked config.log and there're nothing about openssl at the end - HAVE_WORKING_BOOST_SLEEP_FOR refers to checking for dynamic linked boost test... yes - last successful line from ./configure output:

# tail config.log
#define HAVE_BOOST /**/
#define HAVE_BOOST_SYSTEM /**/
#define HAVE_BOOST_FILESYSTEM /**/
#define HAVE_BOOST_PROGRAM_OPTIONS /**/
#define HAVE_BOOST_THREAD /**/
#define HAVE_BOOST_CHRONO /**/
#define HAVE_BOOST_UNIT_TEST_FRAMEWORK /**/
#define HAVE_WORKING_BOOST_SLEEP_FOR 1

configure: exit 1

UPD2. I've found that in log, quite far from the end:

configure:25626: checking for SSL
configure:25633: $PKG_CONFIG --exists --print-errors "libssl"
Package libssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libssl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libssl' found
configure:25636: $? = 1
configure:25650: $PKG_CONFIG --exists --print-errors "libssl"
Package libssl was not found in the pkg-config search path.
Perhaps you should add the directory containing `libssl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libssl' found
configure:25653: $? = 1
configure:25667: result: no
No package 'libssl' found
configure:25683: error: openssl  not found.

Solution 1:

You will find a package name libssl-dev in Synaptic Package Manager (Ubuntu 16.04) and after you install libssl-dev, everything will be solved. by the way, libssl1.0.0 don't works. You'd better install libssl-dev and libssl1.0.0 at same time.

by the way, I don't think the following solution is works: 'pkg-config' is in your PATH and PKG_CONFIG_PATH contains a openssl.pc file. If pkg-config is unavailable you can set INCLUDE_DIR and LIB_DIR manually via: R CMD INSTALL --configure-vars='INCLUDE_DIR=... LIB_DIR=...'

Solution 2:

For some reason PKG_CONFIG_PATH didn't contain the right path for that openssl.pc file needed for pkg-config utility. I did find / -name 'openssl.pc' and found it in /usr/lib/x86_64-linux-gnu/pkgconfig/. That path was also used by my other ubuntu to ./configure.

So I ran PKG_CONFIG_PATH="/usr/lib/x86_64-linux-gnu/pkgconfig/" ./configure and that did the trick!

Other thing, there is another openssl.pc in my /usr/local/ssl/lib/pkgconfig/ but when I tried to use it, the following make command hangs with different errors (like unknown reference to function, etc.).