1

Often there are some packages that I was required to install as prerequisites of some tools, but are not listed in the aptitude package list (or with a slightly different name).

For example, I once encounter an error saying "libstdc++.so.6: cannot open shared object file: No such file or directory.", and by searching the error I resolved it by run "sudo apt-get install lib32stdc++6". So the required package is lib32stdc++6, how could I tell it from the name libstdc++.so.6?

1

There is a tool called apt-file that allows you to search for files in packages. You first need to initialize it by running sudo apt-file update, and then you can run apt-file search libstdc++.so.6. This will at least point you in the right direction.

You can also use Synaptic (or similar) to search for a package that contains the library name.

  • This tools provides some information for finding packages, although some knowledges about the packages you are going to install is inevitable. – Russell Yan Feb 25 '14 at 2:50
  • Absolutely. On another note, if you know the exact path you are expecting a file to be at (which has been almost never in my case), you can use the -F parameter. For example, apt-file search -F /usr/lib32/libstdc++.so.6. – saiarcot895 Feb 25 '14 at 2:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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