gpt4 book ai didi

ubuntu - OpenSSH 升级库与 header 不匹配

转载 作者:太空宇宙 更新时间:2023-11-03 16:59:57 30 4
gpt4 key购买 nike

我正在将更新版本的 openssh 安装到 ubuntu 服务器(raring 13.04)上

我已经设置了export LDFLAGS="-I/usr/lib-I/usr/local/lib"

当运行我的 ./configure 语句时,它是

./configure --prefix=/usr --exec_prefix=/usr --libexecdir=/usr/lib/openssh
--sysconfdir=/etc/ssh --datadir=/usr/share/sshd --with-md5-passwords
--with-privsep-path=/var/lib/sshd

输出结束:

.....
checking OpenSSL header version... 1000105f (OpenSSL 1.0.1e 11 Feb 2013)
checking OpenSSL library version... 1000103f (OpenSSL 1.0.1c 10 May 2012)
checking whether OpenSSL's headers match the library... no
configure: error: Your OpenSSL headers do not match your
library. Check config.log for details.

我尝试了一个提示,建议将 LDFLAGS 更改为

导出 LDFLAGS="-L/usr/lib/libssl.so -/usr/lib/libcrypto.so"

强制使用一个库

但是当我运行 ./configure 命令时,我得到了

.........
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/usr/local/sas/openssh-6.2p2':
configure: error: C compiler cannot create executables
See `config.log' for more details

还有人有进一步的想法吗?

最佳答案

解决方案非常简单。很多人都遇到过这个问题,所以我想分享我是如何解决它的,希望它能帮助那里的人,尤其是“心脏出血虫”的问题。例如,如果您尝试编译 openssl:

checking OpenSSL header version... 1000107f (OpenSSL 1.0.1g 7 Apr 2014)
checking OpenSSL library version... 9080ef (OpenSSL 0.9.8y 5 Feb 2013)
checking whether OpenSSL's headers match the library... no
configure: error: Your OpenSSL headers do not match your
library.

解决方案:

  1. 找到 openssl tarball 并重建它,如下所示。

    tar xvfz /usr/src/openssl-1.0.1g.tar.gz   (IF YOU DID THIS BEFORE GO TO NEXT STEP)
    cd /usr/src/openssl-1.0.1g/
    ./config –prefix=/usr/local –openssldir=/usr/local/openssl shared
    make clean
    make
    make test
    make install
    openssl version
    echo "/usr/local/ssl/lib" >> /etc/ld.so.conf
    ldconfig –v
  2. 重新编译openssh

    tar xvfz /usr/src/openssh-6.6p1.tar.gz   (IF YOU DID THIS BEFORE GO TO NEXT STEP)
    cd /usr/src/openssh-6.6p1/
    ./configure
    make
    make install
  3. 验证安装并重新启动 sshd 守护进程

    ssh –V

    OpenSSH_6.6p1, OpenSSL 1.0.1g 7 Apr 2014 (this should be your display)

    /etc/rc.d/rc.sshd restart

您可能需要退出 ssh session 并重新登录,然后再次执行 ssh -V

关于ubuntu - OpenSSH 升级库与 header 不匹配,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18688859/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com