Link to home
Start Free TrialLog in
Avatar of Robert Silver
Robert SilverFlag for United States of America

asked on

Could someone please explain the following output from a linux based ldd -v command?

I would guess the version information is of form : (GLIBC_2. 14)  so does that mean the version  of  the shared library is 2.14
the highest within a list of components?
Is there a better way to determine  the version of a shared library .so file?  I tried what but I do not have it in centOS version 7
someone suggested strings  libssl.so|grep -A3 "$(#)"
but this did not work in bash shell.

Does anyone have a good solution here for finding the version of an .so library, e.g libssl.so file??

# ldd -v libssl.so
        linux-vdso.so.1 =>  (0x00007ffdc0eb6000)
        libcrypto.so.1.0.0 => /lib/libcrypto.so.1.0.0 (0x00007f7bdb5ea000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f7bdb3e6000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f7bdb024000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f7bdbcd8000)

        Version information:
        ./libssl.so:
                libc.so.6 (GLIBC_2.14) => /lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
        /lib/libcrypto.so.1.0.0:
                libdl.so.2 (GLIBC_2.2.5) => /lib64/libdl.so.2
                libc.so.6 (GLIBC_2.3) => /lib64/libc.so.6
                libc.so.6 (GLIBC_2.7) => /lib64/libc.so.6
                libc.so.6 (GLIBC_2.14) => /lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
        /lib64/libdl.so.2:
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
                libc.so.6 (GLIBC_PRIVATE) => /lib64/libc.so.6
                libc.so.6 (GLIBC_2.2.5) => /lib64/libc.so.6
        /lib64/libc.so.6:
                ld-linux-x86-64.so.2 (GLIBC_2.3) => /lib64/ld-linux-x86-64.so.2
                ld-linux-x86-64.so.2 (GLIBC_PRIVATE) => /lib64/ld-linux-x86-64.so.2
Avatar of Steven Carnahan
Steven Carnahan
Flag of United States of America image

Try:

ldconfig -v

That will give you the version of all .so

To get just for libssl.so grep for it

ldconfig -v | grep libssl.so
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Robert Silver

ASKER

I remain confused where did the 0.9.6 number come from??
ok tried :
[rss@thesource lib]$ rpm -qf ./x86_64-redhat-linux6E/lib64/libc.so
compat-glibc-2.12-4.el7.centos.x86_64

but the lib is openssl.so not libc.so right?
[rss@thesource lib]$ rpm -qf libssl.so
file /usr/lib/libssl.so is not owned by any package
So it is copied there at random...
The solution was far from ideal and did not tell me how to accomplish what I tried to do