V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
station
V2EX  ›  Linux

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

  •  
  •   station · 2016-10-17 11:43:58 +08:00 · 14910 次点击
    这是一个创建于 2749 天前的主题,其中的信息可能已经有所发展或是发生改变。
    编译选项,至于我为什么会去选择 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
    5 条回复    2016-10-17 12:11:37 +08:00
    shlabc
        1
    shlabc  
       2016-10-17 11:51:36 +08:00
    自己下载 openssl-1.1.0b.tar.gz ,然后编译安装
    在 /etc/profile 里修改 PATH
    编译你这个源码时,指定参数--with-openssl ,注意,有的源码要求使用 openssl 源码包解压的路径,而不是安装的路径
    station
        2
    station  
    OP
       2016-10-17 12:01:04 +08:00
    @shlabc 还要下载 openssl ?我 google 看到 openssh 7.1 后面可以选择链接到 libressl
    station
        3
    station  
    OP
       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
        4
    shlabc  
       2016-10-17 12:06:51 +08:00
    @station 大家看不到你的实际操作环境,只能按正常操作方法来进行提示

    总之,就是缺什么补什么,源码编译安装,基本可以搞定一切
    shlabc
        5
    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 ),正常安装成功,你出什么错误提示,网上搜索解决即可。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   887 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 21:50 · PVG 05:50 · LAX 14:50 · JFK 17:50
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.