Search code examples
linuxdebianlibcurllibsshlibssh2

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


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.


Solution

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