3

I'm trying to run a binary file but I get:

./binary: error while loading shared libraries: libcrypto.so.3: cannot open shared object file: No such file or directory

I already tried resolving it by installing libssl-dev as said here, or installing openssl (my version is 1.1.1f 31 Mar 2020) as said here.

Both solutions didn't work. Which other solutions I could try to fix it?

Thanks for you help!

  • 3
    It sounds like binary was not built for Ubuntu 20.04 (which uses libcrypto.so.1.1). Where did you get it, and how did you install it? – steeldriver Apr 03 '23 at 12:47
  • A Google search brings me to this web page. https://stackoverflow.com/questions/71337612/cannot-link-executable-node-library-libcrypto-so-3-not-found It says in a nut shell that the module may not be supported in ANY version. – David Apr 03 '23 at 13:02
  • Thanks for your replies! binary is actually a file for an university assignment. I wanted to solve the issues rather than asking the professor :/ – Francesco Urdih Apr 03 '23 at 13:19
  • 1
    Well, Ubuntu 22.04 provides libcrypto.so.3 (via package libssl3) so perhaps that is what you should be using? – steeldriver Apr 03 '23 at 13:29
  • Got it, thanks again for your help! – Francesco Urdih Apr 03 '23 at 13:34

2 Answers2

2

Here is a few more options for you:

  1. Check if the library exist with find / -name libcrypto.so.3 if it exist apply this export LD_LIBRARY_PATH=/path/to/lib:$LD_LIBRARY_PATH ( with the good path )

  2. Install the libssl3 package sudo apt-get install libssl3-dev

  3. If that still dont work you can also simply trying reinstalling the library

Saxtheowl
  • 1,739
  • 2
  • 10
  • 20
1

I solved this by installing OpenSSL libraries by myself.

It uses GNU Autotools.

  1. Download a release from https://github.com/openssl/openssl.
  2. Read https://github.com/openssl/openssl/blob/master/NOTES-UNIX.md, and do Configure.
  3. Then lovely make, then make install.
  4. Do not forget to update your LD_LIBRARY_PATH, also you can add export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:path/to/openssl/installation to .bashrc.
vityaman
  • 11
  • 1