in reply to Re^2: Running remote commands (Net::SSH2)
in thread Running remote commands (Net::SSH2)

/bin/sh ../../libtool --tag=CC --mode=link gcc -g -O2 -o ssh2 ssh2 +.o ../../src/libssh2.la libtool: link: gcc -g -O2 -o .libs/ssh2 ssh2.o ../../src/.libs/libssh +2.so -L/usr/local/ssl/lib -lssl -lcrypto -lz -Wl,-rpath -Wl,/usr/loca +l/lib ../../src/.libs/libssh2.so: undefined reference to `dlerror' ../../src/.libs/libssh2.so: undefined reference to `dlclose' ../../src/.libs/libssh2.so: undefined reference to `dlopen' ../../src/.libs/libssh2.so: undefined reference to `dlsym'

Looks like a problem with libdl not having been found during ./configure, so that the required -ldl is missing from the link command  (the dl library implements dlopen etc. which are used for run-time dynamic linking of shared libs).

Maybe check