我正在将更新版本的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更改为
的提示 export 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
任何人都有任何进一步的想法吗?
答案 0 :(得分:1)
解决方案非常简单。很多人都面临这个问题,所以我想分享我是如何解决它的,希望它可以帮助那里的人,特别是“心脏出血虫”的问题。如果您尝试编译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.
找到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
重新编译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
验证安装并重新启动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会话并重新登录,然后再次ssh -V
。