OpenSSL headers missing when building OpenSSH

name picture name · May 19, 2015 · Viewed 27.1k times · Source

I want to build a certain OpenSSH version with a specific OpenSSL version from sources, but I get the following error:

mkdir /tmp/ssh
cp openssh-6.7p1.tar.gz /tmp/ssh
cp openssl-1.0.1l.tar.gz /tmp/ssh
cd /tmp/ssh
tar zxvf openssl-1.0.1l.tar.gz
cd openssl-1.0.1l
./config --prefix=/tmp/ssh
make
make install
cd ..
tar zxvf openssh-6.7p1.tar.gz
cd openssh-6.7p1
./configure --with-ssl-dir=/tmp/ssh --prefix=/tmp/ssh

...
checking openssl/opensslv.h usability... no
checking openssl/opensslv.h presence... no
checking for openssl/opensslv.h... no
configure: error: *** OpenSSL headers missing - please install first or check config.log ***

Is there a bug in openSSH's configure script or do I have to change any command?

Answer

Ann Kilzer picture Ann Kilzer · Jan 15, 2016

Here's a way without sending flags to ./configure You need to install OpenSSL first. Get the latest tarball here.

./config
make
make test
make install

Then install libssl-dev

apt-get install libssl-dev

Then you can retry installing OpenSSH:

cd openssh-[version]
./configure
make
make install