linux查找openssl安装包,linux-OpenSSH 7.3p1构建:configure仅查找旧版本的OpenSSL库

在Linux环境中,作者尝试在装有旧版OpenSSL的系统上构建OpenSSH 7.3p1,通过编译并安装了OpenSSL 1.0.2h。但在配置OpenSSH时遇到错误,configure脚本仍然寻找旧的OpenSSL库。经过调试,作者发现问题与动态链接库有关,最终通过设置LD_LIBRARY_PATH环境变量并指定--with-ldflags解决了问题,成功配置了OpenSSH。
摘要由CSDN通过智能技术生成

我正在尝试在安装了旧版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&

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值