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

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

环境:centos7 安装 curl

当我开始安装 curl 和 ./configure --with-ssl --with-zlib 时,我出现了关于库的错误,link-time 是什么意思?它的环境设置?我对 make 的安装没有任何经验,需要安装其他包吗?如何解决?

./configrue --with-ssl --with-zlib

出现错误:

checking run-time libs availability... failed
configure: error: one or more libs available at link-time are not available 
run-time. Libs used at link-time: -lssh2  -lssl -lcrypto -lz

错误发生是因为 openssl 安装

安装openssl后,应该检查一下它是否有用 当我输入 openssl version 时,它显示相同的未知路径错误

所以,你应该设置:

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

成功了!

也可以在configure脚本前加上LD_LIBRARY_PATH

LD_LIBRARY_PATH=/usr/local/lib64 ./configure --with-ssl --with-zlib