0

I would like to install phpmyadmin on a production server, and apt says it will uninstall libgd2.

In this case I know libgd2 is not used, but I've asked myself if in another case I would be able to check if the library is used (and I didn't know how to do that).

So, is there any way to check when, or how, or by whom, a library is used?

Thanks.

Edit: when I say 'being used' I mean accessed or called. Where I work some people use libraries that come with the system on their own programs, sometimes happens that a user asks for a library being installed by it's own name, then I need to install something that disagree with that library and I do not know if the user still uses it.

nedm
  • 5,630
  • 5
  • 32
  • 52
Marc Riera
  • 1,637
  • 4
  • 23
  • 38

2 Answers2

1

Package management's the clean way to do this, but the this-is-a-nail-and-I-have-a-hammer approach would be something like:

find / -mode 755 -type f -exec ldd {} \; | grep libgd

I'm sure there's a better alternative to "-mode 755" to find anything 755/775/700/etc., but I don't know it offhand. But this'll certainly work!

BMDan
  • 7,249
  • 2
  • 23
  • 34
0

The answer depends on the distribution. Your wording suggests that you use Debian or Ubuntu. There, the answer is:

$ aptitude why libgd2-noxpm
i   trac-mastertickets Recommends trac-graphviz                                 
i A trac-graphviz      Depends    python-pygraphviz                             
i A python-pygraphviz  Depends    graphviz (>= 2.16)                            
i A graphviz           Depends    libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm
                                   (>= 2.0.36~rc1~dfsg)
AEP
  • 432
  • 2
  • 4