OpenSSL headers missing when building OpenSSH
I want to build a specific version of OpenSSH with a specific version of OpenSSL from sources, but I am getting 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 the openSSH configure script or do I need to change any command?
source to share
Here's the way without sending apartments to ./configure
First you need to install OpenSSL. Get the latest tarball here .
./config
make
make test
make install
Then install libssl-dev
apt-get install libssl-dev
Then you can redo the OpenSSH installation:
cd openssh-[version]
./configure
make
make install
source to share
ftp://ftp.ca.openbsd.org/pub/OpenBSD/OpenSSH/portable/INSTALL says:
LibreSSL / OpenSSL must be compiled as a position independent library (i.e. with -fPIC), otherwise OpenSSH will not be able to link to it. If you must use non-positional libcrypto then you may need to configure OpenSSH -without-pie.
The following commands no longer result in the "OpenSSL Header Headers" error:
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 --without-pie
source to share
Is there a bug in the openSSH configure script or do I need to change any command?
According to Installing OpenSSL and OpenSSH :
If "configure" cannot find ssl, change the configure command to:
./configure --prefix=/usr --with-ssl-dir=/usr/local/ssl --with-tcp-wrappers
The above means OpenSSL headers are located in /usr/local/ssl/include
and libraries are located in /usr/local/ssl/lib
. I think you need to change the path to /tmp/ssh
.
From:
cd openssl-1.0.1l
./config --prefix=/tmp/ssh
...
I think you should be using:
cd openssl-1.0.1l
./config --openssldir=/tmp/ssh/openssl
...
Also see Compilation and Installation on the OpenSSL wiki. You might want to use other parameters like enable-ec_nistp_64_gcc_128
.
From OpenSSL to /tmp/ssh/openssl
, then:
cd openssh-6.7p1
./configure --with-ssl-dir=/tmp/ssh/openssl --prefix=/tmp/ssh
...
Using a non-system on the assumption that OpenSSL might cause problems. So you can also check Build OpenSSL with RPATH? ... You might also want to create OpenSSH using RPATH.
source to share