问题描述
尝试./configure libcurl 7.22.0时出现以下错误
I get the following error when trying to ./configure libcurl 7.22.0
当我使用-/-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在运行时不可用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!