openssh 链接 libressl 编译,提示未找到 openssl 头文件

2016-10-17 11:43:58 +08:00
 station
编译选项,至于我为什么会去选择 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
14918 次点击
所在节点    Linux
5 条回复
shlabc
2016-10-17 11:51:36 +08:00
自己下载 openssl-1.1.0b.tar.gz ,然后编译安装
在 /etc/profile 里修改 PATH
编译你这个源码时,指定参数--with-openssl ,注意,有的源码要求使用 openssl 源码包解压的路径,而不是安装的路径
station
2016-10-17 12:01:04 +08:00
@shlabc 还要下载 openssl ?我 google 看到 openssh 7.1 后面可以选择链接到 libressl
station
2016-10-17 12:05:50 +08:00
@shlabc 试了下你的解压 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.
shlabc
2016-10-17 12:06:51 +08:00
@station 大家看不到你的实际操作环境,只能按正常操作方法来进行提示

总之,就是缺什么补什么,源码编译安装,基本可以搞定一切
shlabc
2016-10-17 12:11:37 +08:00
@station

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 ),正常安装成功,你出什么错误提示,网上搜索解决即可。

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/313277

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX