技术解析

openssh 链接 libressl 编译,提示未找到 openssl 头文件
0
2021-07-01 12:34:36
idczone
编译选项,至于我为什么会去选择 libressl ,纯粹出于实验

configure: error: OpenSSL version header not found

zlib ./configure --prefix=/usr/local/zlib – 64&&make&&make install

libressl ./configure --prefix=/usr/local/libressl LDFLAGS=-lrt&&make check&&make install

openssh ./configure --prefix=/usr/local/openssh --sysconfdir=/etc/ssh --with-zlib=/usr/local/zlib --with-ssl-dir=/usr/local/libressl --with-selinux --with-md5-passwords --with-ssl-engine
自己下载 openssl-1.1.0b.tar.gz ,然后编译安装
在 /etc/profile 里修改 PATH
编译你这个源码时,指定参数--with-openssl ,注意,有的源码要求使用 openssl 源码包解压的路径,而不是安装的路径

还要下载 openssl ?我 google 看到 openssh 7.1 后面可以选择链接到 libressl

试了下你的解压 ssl 源码包的方法
checking whether snprintf correctly terminates long strings... yes
checking whether vsnprintf returns correct values on overflow... yes
checking whether snprintf can declare const char *fmt... yes
checking whether system supports SO_PEERCRED getsockopt... yes
checking for (overly) strict mkstemp... yes
checking if openpty correctly handles controlling tty... yes
checking whether AI_NUMERICSERV is declared... yes
checking whether getpgrp requires zero arguments... yes
checking OpenSSL header version... 20000000 (LibreSSL 2.5.0)
checking OpenSSL library version... 1000105f (OpenSSL 1.0.1e-fips 11 Feb 2013)
checking whether OpenSSL's headers match the library... no
configure: error: Your OpenSSL headers do not match your
library. Check config.log for details.
If you are sure your installation is consistent, you can disable the che ck
by running "./configure --without-openssl-header-check".
Also see contrib/findssl.sh for help identifying header/library mismatch es.

大家看不到你的实际操作环境,只能按正常操作方法来进行提示
总之,就是缺什么补什么,源码编译安装,基本可以搞定一切


yum -y install openssl*
yum -y install openssl-devel
wget ftp://ftp.openssl.org/source/openssl-1.0.2h.tar.gz
tar zvxf openssl-1.0.2h.tar.gz
cd openssl-1.0.2h
./config --prefix=/usr/local/ins/openssl-1.0.2h
make && make install
这是我以前安装 openssl-1.0.2h 时的命令( CentOS 5.11 ),正常安装成功,你出什么错误提示,网上搜索解决即可。

数据地带为您的网站提供全球顶级IDC资源
在线咨询
专属客服