Im trying to use twoBitToFa, which is a small program released by the University of California Santa Cruz, that uncompresses large genome files and I get this error:

error while loading shared libraries: libssl.so.10: cannot open shared object file: No     such file or directory

I tried searching for what package provides it. I switched from Fedora which had yum provides but when looking for the Ubuntu equivalent, I came across apt-file search but when I tried that I got a command not found error.

How can I get this libssl file, and more generally, how can I search for what package provides a file so I can do this by myself in the future?

  • You need to install apt-file with sudo apt-get install apt-file and then you need to run sudo apt-get update and sudo apt-get install apt-file and sudo apt-file update.
    – mchid
    Feb 6 '19 at 16:26

Lets make sure that you have your SSL installed and updated:

sudo apt-get update
sudo apt-get install libssl1.0.0 libssl-dev

Now lets fix the naming of the file by creating a link:

cd /lib/x86_64-linux-gnu
sudo ln -s libssl.so.1.0.0 libssl.so.10
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10

And finally, lets inform the developer about this flaw so he can fix it :)

  • 3
    In my case (bedToBigBed from UCSC) I also had to run a similar command for "libcrypto" in addition to the above answer: sudo ln -s /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.10 Oct 25 '13 at 16:55
  • 2
    In my case i needed to reinstall the packages. sudo apt-get install libssl1.0.0 libssl-dev --reinstall Jan 9 '17 at 10:30
  • Thanks @EdwardWilde, reinstall seems the easiest! sudo apt-get install libssl1.0.0 libssl-dev --reinstall Jun 26 '18 at 11:21
  • 1
    After the apt-get commands, I'm still not seeing any libssl* files in /lib/x86_64-linux-gnu. (Ubuntu 18)
    – MiloDC
    Aug 19 '18 at 0:00
  • 4
    on 18.04, the library was installed on /usr/lib/x86_64-linux-gnu
    – Sa'ad
    Nov 5 '18 at 13:39

Seems that mongo is expecting libssl files in /usr/lib/:

  sudo ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /usr/lib/libssl.so.10
  sudo ln -s /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 /usr/lib/libcrypto.so.10
  • # ln -s /usr/local/lib/libssl.so.1.1 /usr/lib/libssl.so.1.1 # ln -s /usr/local/lib/libcrypto.so.1.1 /usr/lib/libcrypto.so.1.1
    – waza123
    Jul 12 '19 at 6:19
  • Are these 2 the same? They seem to be of different versions.
    – Yixing Liu
    Sep 1 '19 at 5:04
  • also one might want to see this answer about mongodb superuser.com/a/1215357/126616 Oct 20 '20 at 20:42

I am one of the developers of these tools. Our binaries don't support Ubuntu officially (yet). The official way to fix this problem is to recompile from source, which just has gotten extremely simple (see https://github.com/NullModel/kentUtils). We are currently trying to build static binaries without the libssl dependency.

  • Is there a new link? The link above says it's now obsolete.
    – Ryuu
    Oct 25 '19 at 4:08

In my case, I was foolishly using an application compiled for Red Hat Enterprise Linux on my Ubuntu machine. Merely using the Ubuntu version solved the problem.

This is similar to the lack of support for Ubuntu that Max describes.

  • Same here. Not absolutely sure this is the primary reason but it might just be. Fyi - software was RoyalRender.
    – bossi
    Oct 25 '15 at 20:16
  • yeah, in my case I downloaded mongo tar.gz for not ubuntu (another Linux). When download mongo see dropdown list on mongo site and choose ubuntu. Jul 9 '16 at 7:34
  • 1
    same here... New to Ubuntu... this answer saved me after about 45mins of googling and trials May 14 '17 at 21:24
  • Same here. 1 How did the others managed to get it to work? Perhaps they missed the "Ubuntu" reference in the OP? 2 Why would a distro matter? Isn't it compiled against the same architecture?
    – Ryuu
    Jan 8 '19 at 10:13

Just install libssl1.0.0 manually:

wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb
sudo apt install ./libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb

I somehow got my symlinks corrupted when installing a newer version of OpenSSL. To fix this situation, I fixed my symlinks in /usr/lib64. E.g. sudo ln -sf libssl.so.0.9.8e libssl.so.10


Regarding apt-file, first you have to install it

sudo apt install apt-file

and update its cache

sudo apt-file update

Then apt-file search some-file should work.

Regarding the package installations, I think you shouldn't need libssl-dev, you need only libssl1.0.0 - this is the runtime library. The second one is for development

Not the answer you're looking for? Browse other questions tagged or ask your own question.