我正在尝试在安装了旧版OpenSSL版本的Linux机器中构建OpenSSH 7.3p1.
首先,我已经成功编译了OpenSSL 1.0.2h,并将其安装在/opt/openssh-1.0.2h中,而不是在旧的OpenSSL版本所在的/ usr中.
tar xzf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
./config --prefix=/opt/openssl-1.0.2h shared
make depend
make
make test
make install
然后我继续进行OpenSSH:
tar xzf openssh-7.3p1.tar.gz
cd openssh-7.3p1
./configure --prefix=/opt/openssh-7.3p1 --with-openssl=/opt/openssl-1.0.2h
但是配置脚本失败,并显示以下错误消息:
checking OpenSSL header version... 0090802f (OpenSSL 0.9.8e-rhel5 01 Jul 2008)
checking OpenSSL library version... configure: error: OpenSSL >= 0.9.8f required (have "0090802f (OpenSSL 0.9.8e-fips-rhel5 01 Jul 2008)")
如果我使用–with-ssl-dir = / opt / openssl-1.0.2h / ssl,则会显示相同的消息
该工具findssl.sh(位于contrib子目录中)可以正确找到所有OpenSSL版本.其内部注释(注释)建议使用CFLAGS指出所需的库-我引用:
# Now run findssl.sh. This should identify the headers and libraries
# present and their versions. You should be able to identify the
# libraries and headers used and adjust your CFLAGS or remove incorrect
# versions. The output will show OpenSSL's internal version identifier
# and should look something like:
然后我尝试
./configure CFLAGS&