If you want to find out which package contains a particular file, you can use apt-file
. If you want to search archives for a different architecture, you have to use the -a
option, first to create/update the cache for that architecture (normal updating only creates/updates the default one) and then when searching. You can try:
sudo apt-file -a i386 update
apt-file -a i386 search /lib/i386-linux-gnu/libgmp.so.3
This should tell you the correct package to install. If the i386
isn't enabled for you system, you will have to enable it. You should be able to check with:
dpkg --print-foreign-architectures
If i386
isn't listed, you can add it with:
sudo dpkg --add-architecture i386
The above should work for newer Ubuntu versions, but for older ones you might have to do:
sudo dpkg --foreign-architecture i386
After adding, update the package lists:
sudo apt-get update
Then you should be able to install the package found from your apt-file
search like this:
sudo apt-get install libwhatever:i386
If apt-file
doesn't find anything, then it could mean that the library installs to a different place. You could try:
apt-file -a i386 search libgmp.so.3
Then install whatever package it finds. If you do this and you program still doesn't work, you could try symlinking /lib/i386-linux-gnu/libgmp.so.3
to wherever it does install to. Otherwise, if apt-file
doesn't find anything, it likely means that there is no package which contains that version of the library in the repositories. You could then look for a package from a different version of Mint/Ubuntu (or the backports for your release may be a good place to start looking if the release's version is older). If you are really stuck, you would have to cross-compile and install from source.
Update
Your apt-file
output, shows your distro libgmp
package is libgmp10
which contains libgmp.so.10
. Since you are looking for libgmp.so.3
, there is no prizes for guessing this is an older version. No point looking in backports, since this is for newer packages.
A search on http://packages.ubuntu.com/ shows there is a libgmp3
in Ubuntu 12.04. The package page with links to the list of files is here - http://packages.ubuntu.com/precise/libgmp3c2. Installing the 32 bit package on 64 bit Ubuntu/Mint will put the files in different places though (ie libraries in /lib/i386-linux-gnu
. You can download it here - http://packages.ubuntu.com/precise/i386/libgmp3c2/download
Usually this is can be problematic due to possible conflicts, but since the package has a different name it shouldn't conflict with any current libgmp
. It also has only one dependency on libc6
which is the same as what is in Ubuntu 13.04 (the base for Olivia). There will be a different minor version, which may cause some odd bugs, but most likely you will be ok.
You can install like:
sudo dpkg -i dir/downloaded_package.deb
You may also have to install the i386
version of libc6
if you don't have it already:
sudo apt-get install libc6:i386
.i686
or something similar. I'm not familiar with Mint, sorry. – vonbrand Mar 15 '14 at 17:38ldd
. But without knowing the correct package to install, I do not see how your comment is useful. Can you elaborate? – Ole Tange Mar 16 '14 at 10:53