libcurl和libssh2-链接时可用的一个或多个lib在运行时不可用 [英] libcurl with libssh2 - one or more libs available at link-time are not available run-time

查看:490
本文介绍了libcurl和libssh2-链接时可用的一个或多个lib在运行时不可用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试./configure libcurl 7.22.0时出现以下错误

I get the following error when trying to ./configure libcurl 7.22.0

在链接时可用的一个或多个库在运行时不可用.链接时使用的库:-lssh2 -lssl -lcrypto -lrt -lz

one or more libs available at link-time are not available run-time. Libs used at link-time: -lssh2 -lssl -lcrypto -lrt -lz

当我使用-/-with--with-with-libssh2 进行配置时,它就可以正常工作.

When I ./configure with --without-libssh2 it works just fine.

我已采取的步骤:

apt-get install libssl-dev
apt-get install libssh-dev

cd /var
wget http://www.libssh2.org/download/libssh2-1.3.0.tar.gz
tar -zxvf libssh2-1.3.0.tar.gz
cd libssh2-1.3.0
./configure
make
make install

顺便说一句,

SSL支持工作正常.我一定对libssh做错了事

SSL support works fine, by the way. I must have done something wrong with libssh

我也尝试过:

./configure --with-libssh2
./configure --with-libssh2-path=/usr/local/lib
./configure --with-libssh2=/usr
./configure --with-libssh2=/usr/local/lib

但这并没有改变.我不知道还能尝试什么.

But it didn't make a difference. I don't know what else to try.

推荐答案

"libssh-dev"软件包是完全无关且不必要的,因为它是libcurl或libssh2都不使用的另一个库.

The "libssh-dev" package is completely unrelated and unnecessary since it's a different library not used by libcurl nor libssh2.

您面临的问题可能是libssh2的"make install"默认情况下会安装库/usr/local/lib,而您尚未编辑/etc/ld.so.conf来从该目录加载lib.编辑文件并运行ldconfig(两个操作均作为root用户).或者,将libssh2安装到ld.so已搜索到的另一个目录中.

The problem you face is probably that "make install" with libssh2 installs the library /usr/local/lib by default and you have not edited /etc/ld.so.conf to load libs from that directory. Edit the file and run ldconfig (both actions as root). Alternatively, install libssh2 into another directory that already is searched in by ld.so.

这篇关于libcurl和libssh2-链接时可用的一个或多个lib在运行时不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆