I’m puzzled. I have 2 versions of libssl.so in /lib:
/lib/libssl.so.4 and /lib/libssl.so.6
Here is a stripped down minimal example — I’m linking “nothing” with libssl — the result being that it links to libssl.so.4. What determines this?
$ g++ -o foo.so -shared -lssl
$ ldd foo.so |grep ssl
libssl.so.4 => /lib/libssl.so.4 (0xf7f04000)
The option
-lsslinstructs the linker to look for the file namedlibssl.soorlibssl.a. If all you have arelibssl.so.4andlibssl.so.6, then you would have a linker error.Look for a symlink called “libssl.so” somewhere in your library directories, likely in /lib.