Find out library version
Solution 1
I would use dpkg -l | grep libnuma1
to get the version.
As an example, I have ran dpkg -l
on xterm and you can see that I'm running versoin 278-4 of xterm.
# dpkg -l | grep xterm
ii lxterminal 0.1.11-4 amd64 LXDE terminal emulator
ii xterm 278-4 amd64 X terminal emulator
Solution 2
You should try
ldconfig -v | grep libnuma
Solution 3
The file name or contents won't always keep track of the exact version, so you'd typically want to use the packaging system facilities. For Ubuntu, you can either go to packages.ubuntu.com, search for your file, and see what version of the package is in your version of Ubuntu.
Or from the command line, you can first search for the name of the associated package using dpkg -S /usr/lib/libnuma.so.1
, which probably returns libnuma1
as the package name. Then run apt-cache showpkg libnuma1
to find the package version. The apt-cache
output can be pretty long, but the version should be in the first few lines.
Related videos on Youtube
iomartin
Updated on September 18, 2022Comments
-
iomartin over 1 year
I want to find out what version of a C library is installed in my system (Ubuntu 12.04). In particular, I'm interested in libnuma. What is the proper way to do it?
cd /usr/lib ls -l libnuma* -rw-r--r-- 1 root root 70312 Feb 8 2012 libnuma.a lrwxrwxrwx 1 root root 12 Feb 8 2012 libnuma.so -> libnuma.so.1 -rw-r--r-- 1 root root 43976 Feb 8 2012 libnuma.so.1
-
iomartin over 10 yearseven though @jjlin's, approach also work, I like this one better, as it's cleaner and more direct.
-
SuB almost 7 yearsThis works most of the time but not applicable when you compile and install the library, because
dpkg
does not care about libs/apps not installed bydpkg
-
FeRD almost 6 yearsWhile @SuB is correct, the fact is that without a packaging system, there's no way to know what release an individual library was built from, as that information is managed by the packaging system and not contained in the library. The library itself only knows its API version (the number after the
.so
). When you compile and install a library yourself, it's up to you to keep track of where it came from (which is why packaging systems were created). -
Sandun about 5 yearsIt gives me the output but at the beginning of the output there are these two lines. ldconfig: Can't stat /libx32: No such file or directory . ldconfig: Can't stat /usr/libx32: No such file or directory . Is that something to worry about?
-
igor over 2 years
ldconfig -v | grep libnuma
showslibnuma.so.1 -> libnuma.so.1.0.0
, butdpkg -l | grep libnuma1
showsii libnuma1:amd64 2.0.12-1
. This variant does not look reliable.