Thx all :-)
> Hi, how can I find the version of a library on Solaris? Is there a
> specific command?
The library filename sometimes has version info at the end.
You may find API version information inside the library by running
pvs(1) on the library file. For Sun-supplied libraries look for SUNW_*;
strings to find the supported versions (plural). eg:
$ cd /usr/lib
$ pvs libresolv.so.1
libsocket.so.1 (SISCD_2.3, SUNWprivate_1.1);
libnsl.so.1 (SISCD_2.3, SUNWprivate_1.1);
libc.so.1 (SUNW_0.7, SUNWprivate_1.1);
libresolv.so.1;
SUNW_1.1;
SUNW_0.7;
SUNWprivate_1.1;
$ pvs libresolv.so.2
libsocket.so.1 (SUNW_1.4, SUNWprivate_1.1);
libnsl.so.1 (SUNW_1.9.1, SUNWprivate_1.4);
libc.so.1 (SUNW_1.22, SUNWprivate_1.1);
libresolv.so.2;
SUNW_2.2.2;
SUNW_2.2.1;
SUNW_2.2;
SUNW_2.1;
SUNWprivate_2.2;
SUNWprivate_2.1;
Third-party libraries may not have this info.
--
Chris
>> Hi, how can I find the version of a library on Solaris? Is there a
>> specific command?
>
> You may find API version information inside the library by running
> pvs(1) on the library file.
> $ cd /usr/lib
> $ pvs libresolv.so.1
> libsocket.so.1 (SISCD_2.3, SUNWprivate_1.1);
> libnsl.so.1 (SISCD_2.3, SUNWprivate_1.1);
> libc.so.1 (SUNW_0.7, SUNWprivate_1.1);
> libresolv.so.1;
> SUNW_1.1;
> SUNW_0.7;
> SUNWprivate_1.1;
> $ pvs libresolv.so.2
> libsocket.so.1 (SUNW_1.4, SUNWprivate_1.1);
> libnsl.so.1 (SUNW_1.9.1, SUNWprivate_1.4);
> libc.so.1 (SUNW_1.22, SUNWprivate_1.1);
> libresolv.so.2;
> SUNW_2.2.2;
> SUNW_2.2.1;
> SUNW_2.2;
> SUNW_2.1;
> SUNWprivate_2.2;
> SUNWprivate_2.1;
and you can try to find revision control entries with what(1).
$ what /usr/lib/libresolv.so.1
/usr/lib/libresolv.so.1:
SunOS 5.9 Generic May 2002
$ what /usr/lib/libresolv.so.2
/usr/lib/libresolv.so.2:
SunOS 5.9 Generic 112970-09 Sep 2005
Oh that's neat. It doesn't seem quite so useful however in Solaris 10
or OpenSolaris:
$ what /usr/lib/libresolv.so.1
/usr/lib/libresolv.so.1:
SunOS 5.10 Generic 127127-11 Mar 2008
$ what /usr/lib/libresolv.so.2
/usr/lib/libresolv.so.2:
SunOS 5.10 Generic 127127-11 Mar 2008
[...]
$ what /usr/lib/libresolv.so.1
/usr/lib/libresolv.so.1:
SunOS 5.11 snv_134 February 2010
$ what /usr/lib/libresolv.so.2
/usr/lib/libresolv.so.2:
SunOS 5.11 snv_134 February 2010
That might just be due to the boxes I tried it on.
--
Chris
10x guys, 't was exactly what my co-worker was looking for :-)