Score:3

error while loading shared libraries: libcrypto.so.3 ubuntu 20.04

kh flag

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!

hr flag
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?
David avatar
cn flag
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.
Francesco Urdih avatar
kh flag
Thanks for your replies! `binary` is actually a file for an university assignment. I wanted to solve the issues rather than asking the professor :/
hr flag
Well, Ubuntu 22.04 provides libcrypto.so.3 (via package libssl3) so perhaps that is what you should be using?
Francesco Urdih avatar
kh flag
Got it, thanks again for your help!
Score:1
iq flag

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

Francesco Urdih avatar
kh flag
Thanks for your help! Unfortunately, for _1_ I got no result, for _2_ I get `Unable to locate`
Saxtheowl avatar
iq flag
try sudo add-apt-repository main then do the command again
Francesco Urdih avatar
kh flag
Nope, same thing
Saxtheowl avatar
iq flag
What about apt-cache search libssl3-dev ?
Francesco Urdih avatar
kh flag
Doesn't work, at this point I'm going to use Ubuntu 22 in VM as suggested above. Although thanks for your time!
Score:0
gy flag

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.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.