From ldd, it is clear that prime is a 32bit/i386 build. It requires dependencies from same architecture. We may confirm too using:
file ./prime
We search for each missing library file using apt-file (if installed, be aware it downloads large indexes) or https://packages.ubuntu.com for corresponding package then install it.
sudo apt install libsigsegv2:i386 \
libsdl1.2debian:i386 libsdl-image1.2:i386 liblua5.1-0:i386 \
libsdl-mixer1.2:i386 libsdl-net1.2:i386
Answer from user.dz on askubuntu.comFrom ldd, it is clear that prime is a 32bit/i386 build. It requires dependencies from same architecture. We may confirm too using:
file ./prime
We search for each missing library file using apt-file (if installed, be aware it downloads large indexes) or https://packages.ubuntu.com for corresponding package then install it.
sudo apt install libsigsegv2:i386 \
libsdl1.2debian:i386 libsdl-image1.2:i386 liblua5.1-0:i386 \
libsdl-mixer1.2:i386 libsdl-net1.2:i386
For a so called 64-bit application prime needs a bunch i386 libaries. sudo dpkg --add-architecture i386 afterwards sudo apt update
Make sure the not founding libaries are installed for 64-bit and 32-bit.
You can found the relevant packages with apt-file search missing file.
maybe you have to install it sudo apt install apt-file and sudo apt-file update

How to use apt-file
Your library is a dynamic library. You need to tell the operating system where it can locate it at runtime.
To do so, we will need to do those easy steps:
Find where the library is placed if you don't know it.
sudo find / -name the_name_of_the_file.soCheck for the existence of the dynamic library path environment variable(
LD_LIBRARY_PATH)echo $LD_LIBRARY_PATHIf there is nothing to be displayed, add a default path value (or not if you wish to)
LD_LIBRARY_PATH=/usr/local/libWe add the desired path, export it and try the application.
Note that the path should be the directory where the
path.so.somethingis. So ifpath.so.somethingis in/my_library/path.so.something, it should be:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/my_library/
Reference to source
Here are a few solutions you can try:
ldconfig
As AbiusX pointed out: If you have just now installed the library, you may simply need to run ldconfig.
sudo ldconfig
ldconfig creates the necessary links and cache to the most recent shared libraries found in the directories specified on the command line, in the file /etc/ld.so.conf, and in the trusted directories (/lib and /usr/lib).
Usually your package manager will take care of this when you install a new library, but not always, and it won't hurt to run ldconfig even if that is not your issue.
Dev package or wrong version
If that doesn't work, I would also check out Paul's suggestion and look for a "-dev" version of the library. Many libraries are split into dev and non-dev packages. You can use this command to look for it:
apt-cache search <libraryname>
This can also help if you simply have the wrong version of the library installed. Some libraries are published in different versions simultaneously, for example, Python.
Library location
If you are sure that the right package is installed, and ldconfig didn't find it, it may just be in a nonstandard directory. By default, ldconfig looks in /lib, /usr/lib, and directories listed in /etc/ld.so.conf and $LD_LIBRARY_PATH. If your library is somewhere else, you can either add the directory on its own line in /etc/ld.so.conf, append the library's path to $LD_LIBRARY_PATH, or move the library into /usr/lib. Then run ldconfig.
To find out where the library is, try this:
sudo find / -iname *libraryname*.so*
(Replace libraryname with the name of your library)
If you go the $LD_LIBRARY_PATH route, you'll want to put that into your ~/.bashrc file so it will run every time you log in:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/library
I ran into the same issue I think (I had the same error message trying to launch RStudio after upgrading Ubuntu from 18.04 to 20.04). Here is what worked for me after reading the following page: https://packages.ubuntu.com/xenial/amd64/libssl1.0.0/download
- Edit the source list
sudo nano /etc/apt/sources.listto add the following line:deb http://security.ubuntu.com/ubuntu xenial-security main - Then
sudo apt updateandsudo apt install libssl1.0.0.
I hope t works for you too.
I solved my problem with libssl1.0.0 like this:
I opened http://security.ubuntu.com/ubuntu/pool/main/o/openssl1.0/ in my browser and download last version of libssl1.0.0 for my system (for me it was libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb) Then I just install it:
sudo gdebi ./libssl1.0.0_1.0.2n-1ubuntu5.6_amd64.deb
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 :)
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
Creating a symbolic link to /usr/lib/libfreetype.so.6 should not be applied if the error was thrown by a 32-bit application on a 64-bit Linux distribution. The library could be left 'broken'.
What you want on a 64-bit system is to install the necessary 32-bit dependencies around your 32-bit application, so that it will be able to detect and use the already existing libfreetype.so.6. This differs per application, but commonly missing are these:
sudo apt-get install libgtk2.0-0:i386 libidn11:i386 libglu1-mesa:i386
And these may possibly fix the problem too:
sudo apt-get install libpangox-1.0-0:i386 libpangoxft-1.0-0:i386
Regards, Albert Kok
I was able to fix this problem however I'm still not entirely sure why this was a problem in the first place.
After running strace, I saw open("/usr/local/lib/libfreetype.so.6", O_RDONLY|O_CLOEXEC) = -1 EACCES (Permission denied) which doesn't quite make sense since other programs (without sudo powers) which depended on libfreetype were able to run, and the permissions are set for read/write for all, also running evince under sudo didn't help either.
My apt-get of libfreetype placed the library in /usr/lib/x86_64-linux-gnu/libfreetype.so.6 but for some reason evince wasn't checking that folder (even though it was added to LD_LIBRARY_PATH). However I created a symbolic link to a folder which it does check sudo ln -s /usr/lib/x86_64-linux-gnu/libfreetype.so.6.10.1 /usr/lib/libfreetype.so.6 and now evince runs fine.