nat*_*tli 3 linux debian libcurl libssh libssh2
尝试 ./configure libcurl 7.22.0 时出现以下错误
链接时可用的一个或多个库在运行时不可用。链接时使用的库:-lssh2 -lssl -lcrypto -lrt -lz
当我使用--without-libssh2 ./configure 时,它工作得很好。
我已采取的步骤:
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
Run Code Online (Sandbox Code Playgroud)
顺便说一句,SSL 支持运行良好。我一定是 libssh 做错了什么
我也尝试过:
./configure --with-libssh2
./configure --with-libssh2-path=/usr/local/lib
./configure --with-libssh2=/usr
./configure --with-libssh2=/usr/local/lib
Run Code Online (Sandbox Code Playgroud)
但这并没有什么区别。我不知道还能尝试什么。
“libssh-dev”包完全不相关且不必要,因为它是 libcurl 和 libssh2 均未使用的不同库。
您面临的问题可能是使用 libssh2 进行“make install”默认安装库 /usr/local/lib 并且您尚未编辑 /etc/ld.so.conf 来从该目录加载库。编辑该文件并运行 ldconfig(这两个操作均以 root 身份进行)。或者,将 libssh2 安装到 ld.so 已搜索到的另一个目录中。