OpenSSL的头建设的OpenSSH
时丢失我想建立与源特定的OpenSSL版本有一定的OpenSSH版本,但我得到了以下错误:OpenSSL的头建设的OpenSSH
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 ***
有OpenSSH中的配置脚本错误还是我必须改变任何命令?
Is there a bug in openSSH's configure script or do I have to change any command?
根据Installing OpenSSL and OpenSSH:上述
If 'configure' can't find ssl, change the configure command to:
./configure --prefix=/usr --with-ssl-dir=/usr/local/ssl --with-tcp-wrappers
装置OpenSSL的报头分别位于/usr/local/ssl/include
和库位于/usr/local/ssl/lib
。我认为你需要改变路径到/tmp/ssh
。
来源:
cd openssl-1.0.1l
./config --prefix=/tmp/ssh
...
我认为你应该使用:
cd openssl-1.0.1l
./config --openssldir=/tmp/ssh/openssl
...
另见Compilation and Installation在OpenSSL的维基。您可能想要使用其他选项,如enable-ec_nistp_64_gcc_128
。
随着OpenSSL的在/tmp/ssh/openssl
,则:
cd openssh-6.7p1
./configure --with-ssl-dir=/tmp/ssh/openssl --prefix=/tmp/ssh
...
使用提供的OpenSSL非系统可引起麻烦。所以你可能也想看看Build OpenSSL with RPATH?。你也可能想用RPATH构建OpenSSH。
ftp://ftp.ca.openbsd.org/pub/OpenBSD/OpenSSH/portable/INSTALL说:
LibreSSL/OpenSSL should be compiled as a position-independent library (i.e. with -fPIC) otherwise OpenSSH will not be able to link with it. If you must use a non-position-independent libcrypto, then you may need to configure OpenSSH --without-pie.
下面的命令不会导致“OpenSSL的头失踪”的错误了:
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
这里的而不发送单位,以./configure
的方式,您需要安装OpenSSL的第一。获取最新的tarball here。
./config
make
make test
make install
apt-get install libssl-dev
然后你就可以重试installing OpenSSH:
cd openssh-[version]
./configure
make
make install
更改 “./config中前缀=/tmp目录/ SSH” 到” ./config中--openssldir =/tmp/ssh/openssl“并将”./configure --with-ssl-dir =/tmp/ssh --prefix =/tmp/ssh“更改为”./configure --with-ssl-dir =/tmp/ssh/openssl --prefix =/tmp/ssh“导致相同的”OpenSSL头文件丢失“错误。 – name