Search code examples
linuxnetwork-programmingnslookupdig

shared libraries of dig and nslookup


I am using centos 6.4. While doing dig or nslookup, I got below error

dig google.com

dig: error while loading shared libraries: libcrypto.so.4: cannot open shared object file: No such file or directory

here is my ldd of dig

'# ldd /usr/bin/dig 
    linux-vdso.so.1 =>  (0x00007fff5e674000)
    liblwres.so.80 => /usr/lib64/liblwres.so.80 (0x00007f73d5c1c000)
    libdns.so.81 => /usr/lib64/libdns.so.81 (0x00007f73d5883000)
    libbind9.so.80 => /usr/lib64/libbind9.so.80 (0x00007f73d5676000)
    libisccfg.so.82 => /usr/lib64/libisccfg.so.82 (0x00007f73d5454000)
    libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007f73d5210000)
    libcrypto.so.10 => /usr/lib64/libcrypto.so.10 (0x00007f73d4e75000)
    libisccc.so.80 => /usr/lib64/libisccc.so.80 (0x00007f73d4c6d000) '
    ....

Do you know how can I fix this error?

Please help,

Thanks, SP


Solution

  • try a soft link

    ln -s /usr/lib64/libcrypto.so.10 /lib

    Let us know if that helped you.

    Or you can remove and install again using yum. Normally library files places to its apt position when installs using yum.

    yum remove dns-utils

    yum install dns-utils

    You can enable epel repositories in case you need it epel