Closed gowenpotato closed 5 years ago
Seems like expected behavior to me. This happens when the libraries are not put to the default directories (what you obviously don't want to do as you use --prefix).
I speculate that it would load if you add LD_LIBRARY_PATH=/opt/openssl/lib/ to your environment when you want to execute your "special" openssl with CMP. Like
LD_LIBRARY_PATH=/opt/openssl/lib /opt/openssl/bin/openssl cmp --help
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html might be an interesting source of related information.
That one might be easier than strace:
man ldd
I just tried installing with nothing passed as arguments during ./config, and I get the same error. The openssl now lives in
user$/usr/local/bin/openssl
/usr/local/bin/openssl: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory
so I go and search for the libssl.so.3 file:
user$sudo find / -iname "*libssl.so.3"
/home/LocalAdminUser/cmpossl-cmp/libssl.so.3
/usr/local/lib/libssl.so.3
so I try your trick
LD_LIBRARY_PATH=/usr/local/lib /usr/local/bin/openssl cmp --help
and this now works - so this was necessary even on the default install - or am I missing something?
This issue is a pretty general one, not an CMPforOpenSSL one, and not even an OpenSSL one.
Whether /usr/local/lib
is searched automatically depends on your system settings.
See https://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib for details.
OK, thanks very much - I am not very experienced on Linux, but if this is on a platform as common as Ubuntu it might be worth a note in the "default install" section?
After using the default install method on Ubuntu 18.04 LTS (with below options)
I received an error:
after performing strace I just did this from within the cmpossl directory:
and the fix worked - is this a bug or is this expected behaviour?