Followed the guide to upgrade my OpenSSL to version 1.1.0f and after successful installation I get this error “Error loading shared libraries libcrypto.so.1.1” when OpenSSL command is invoked.
Below is the complete error message.
openssl: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory"
If you are getting this error, then here’s how I solved this error.
How to fix error loading shared libraries libcrypto.so.1.1
I also ran into the same error after installing latest version of OpenSSL. Here is the solution:
By default, the OpenSSL libraries would be stored under /usr/lib64 which will also be included in search path. If OpenSSL is compiled from source, then the shared libraries would have been installed under /usr/local/lib64 (in case, if prefix option were not used while configuring OpenSSL). It means, the newly installed libraries would not be in search path and that’s reason for this error. So all we need to do is, include OpenSSL libraries in search path using the below command.
# echo "/usr/local/lib64" > /etc/ld.so.conf.d/openssl.conf
Once done, rebuild ldconfig cache.
# ldconfig
That’s it. Now the OpenSSL command should work as expected. To test OpenSSL, you may try creating self signed certificate or try executing one of the command mentioned here.
Many Many Thanks!!!!!! Works well!!! E. F
Thank you! Works also on CentOS9 with the following error message: openssl: /lib64/libcrypto.so.3: version `OPENSSL_3.0.3′ not found (required by openssl)