shared libraries of dig and nslookup

偶尔善良 提交于 2021-02-17 06:05:48

问题


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


回答1:


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




回答2:


When you are trying

ldd /usr/bin/dig

Are you able to find a line like

libcrypto.so.4 => not found

If so Try

locate libcrypto.so.4

Suppose you can locate the file at /path/to/file/libcrypto.so.4

then try the command

export LD_LIBRARY_PATH="/path/to/file"

Then try command dig. It should be fine. Other wise you need to search for the package that provides the libcrypto.so.4 library



来源:https://stackoverflow.com/questions/17360593/shared-libraries-of-dig-and-nslookup

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!