If it is executed according to the standard configure:
. /Configure -- prefix =/data/users/mooon/third-party/libssh2 -- With-OpenSSL -- With-libssl-Prefix =/data/users/mooon/third-party/OpenSSL -- without-libgcrypt-Prefix
If the following error is returned:
Checking for shared library run path origin... Done
Checking for libssl... no
Checking for libgcrypt... no
Configure: Error: cannot find OpenSSL or libgcrypt,
Try -- With-libssl-Prefix = path or -- With-libgcrypt-Prefix = path
Please change it to the following:
./Configure -- prefix =/data/users/mooon/third-party/libssh2Cppflags= "-I/data/users/mooon/third-party/OpenSSL/include"Ldflags= "-L/data/users/mooon/third-party/OpenSSL/lib"
Why can the above methods solve the problem:
The principle is very simple, that is, to meet its needs. It is reported that OpenSSL cannot be found. Since -- With-libssl-Prefix does not take effect, it is directly specified through cppflags and ldflags, when ". /configure -- Help "to see the supported. You can even view the config. log file to learn about this information. In the future, you can use a similar method to solve similar problems, and the software won't work hard.
One important reason for this error is that OpenSSL is not installed in the standard directory. If OpenSSL is installed with A./configure without -- prefix, this problem may not occur.