3

I have /usr/lib32/libstdc++.so.6 library on my Ubuntu system. I would like to know which package brought it there. How to know that?

  • libstdc++.so.6 is the C++ standard library - many applications (including those shipped by Ubuntu) depend on it. – JonasCz - Reinstate Monica Mar 15 '18 at 14:36
4

Now that you know which package /usr/lib32/libstdc++.so.6 came from, you can find out which packages depend on lib32stdc++6 by running:

sudo apt-cache rdepends lib32stdc++6

This will give you a list of package(s) that depend/installed lib32stdc++6

| improve this answer | |
3

Please run dpkg -S /usr/lib32/libstdc++.so.6

| improve this answer | |
  • as output I got lib32stdc++6: /usr/lib32/libstdc++.so.6 . Does lib32stdc++6 is package name? – vico Mar 15 '18 at 13:28
  • Does it possible that lib32stdc++6 came with another package in my system? If yes, how to know whole hierarchy then? – vico Mar 15 '18 at 13:34
  • Sure, it is the package name. If you not sure, you can check if you have it installed by dpkg -l | grep lib32stdc++6 – mariaczi Mar 15 '18 at 13:38
  • I don't remember I run command aptitude install lib32stdc++6 is it possible that this package came with another package? – vico Mar 15 '18 at 13:42
  • It maybe was installed as a dependency of another one. – mariaczi Mar 15 '18 at 13:45
2

Another solution is to use the tool apt-file :

  • Install it using :

    $ sudo apt-get update && sudo apt-get install apt-file
    
  • Update it's database :

    $ sudo apt-file update
    
  • Search for your desired file :

    $ sudo apt-file search /usr/lib32/libstdc++.so.6
    

The result should be :

$ apt-file search /usr/lib32/libstdc++.so.6
lib32stdc++6: /usr/lib32/libstdc++.so.6
lib32stdc++6: /usr/lib32/libstdc++.so.6.0.21
lib32stdc++6: /usr/share/gdb/auto-load/usr/lib32/libstdc++.so.6.0.21-gdb.py
lib32stdc++6-5-dbg: /usr/lib/debug/usr/lib32/libstdc++.so.6.0.21

/usr/lib32/libstdc++.so.6

Which lead us to know that the package which installed should be lib32stdc++6.

| improve this answer | |
1

You can search it in https://packages.ubuntu.com

For your case will be this link.

| improve this answer | |
  • But how to find libstdc++.so.6 there? – vico Mar 15 '18 at 13:35
  • Check for the 2nd link, that link contains the search I made for you. – Maki Mar 15 '18 at 13:37
  • I see Package lib32stdc++6 that I suppose contains many files and one of them might be libstdc++.so.6. But I don't see that exactly. – vico Mar 15 '18 at 13:45
  • If you go inside the link I shared with you, you will see this, that's the prove of the file you are searching for. – Maki Mar 15 '18 at 14:11

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