Find Version of Development Library from Command Line?

Find Version of Development Library from Command Line?

I installed the c++ boost development libraries using Ubuntu software centre. The problem is that it was quite a long time ago and I cannot remember where they are installed nor what version they were. Is there anything I can do from the command line that will tell me what version(s) I have installed on my system?? I know I can do things like

gcc -v

to get version of an application but is there a similar thing available for libraries? I am using ubuntu 12.04

1

4 Answers

You can quickly find what version or where a library is, even if you do not quite know the title, with dpkg, and, in your case, using boost as the query term:

dpkg -l '*boost*'

and then query dpkg again with this option for a full list of file locations now you know the name of the file:

dpkg -L <'name of lib'>

The name of the library may, for example, be libboost1.46-dev.

ldconfig -v requires sudo.

All you really need is to query it, so this will do.

ldconfig -p | grep [name]

Use ldconfig -v to print libraries and current version number and grep to filter your results ldconfig -v | grep [name].

It is better to find the packadge of the lib with dpkg -S libXYZ.so.N.

Than do apt-cache showpkg libXYZ and the version numbers is shown.

Your Answer

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

Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.