libcurl with libssh2 - one or more libs available at link-time are not available run-time

泄露秘密 提交于 2019-12-08 01:56:54

问题


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

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

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

Steps I have taken:

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 support works fine, by the way. I must have done something wrong with libssh

I have also tried:

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


回答1:


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

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.




回答2:


check while openssl installed successly?

openssl version

if not show version info, set openssl correctly for example:

ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/libssl.so.1.1
ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/libcrypto.so.1.1

and continue install curl, it work for me



来源:https://stackoverflow.com/questions/8059425/libcurl-with-libssh2-one-or-more-libs-available-at-link-time-are-not-available

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!