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

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

问题描述

尝试 ./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

当我使用 --without-libssh2 进行 ./configure 时,它​​工作得很好.

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 以从该目录加载库.编辑该文件并运行 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.

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

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