Home > Network > DNS > drill | About

How to fix the "drill: error while loading shared libraries: libldns.so.1: cannot open shared object file: No such file or directory" error

root@dns2-sec ~/DOWNLOADS/ldns-1.6.17/drill # drill -TD security.debian.org @10.10.10.7
drill: error while loading shared libraries: libldns.so.1: cannot open shared object file: No such file or directory
root@dns2-sec ~/DOWNLOADS/ldns-1.6.17/drill # 

You need to run ldns-config and ldconfig.

root@dns2-sec ~/DOWNLOADS/ldns-1.6.17/drill # ldd /usr/local/bin/drill 
        linux-vdso.so.1 =>  (0x00007ffe4e191000)
        libldns.so.1 => not found
        libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007f9110f99000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9110c0d000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f9110a09000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f91107f2000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f91113a6000)
root@dns2-sec ~/DOWNLOADS/ldns-1.6.17/drill # 

The trace above shows that libldns.so.1 was not found (ldd shows the dynamic libraries needed by any binary). Running ldns-config and ldconfig resolves this issue :

root@dns2-sec ~/DOWNLOADS/ldns-1.6.17/drill # ldns-config 
root@dns2-sec ~/DOWNLOADS/ldns-1.6.17/drill # ldconfig 
root@dns2-sec ~/DOWNLOADS/ldns-1.6.17/drill # ldd /usr/local/bin/drill 
        linux-vdso.so.1 =>  (0x00007fffe1ff1000)
        libldns.so.1 => /usr/local/lib/libldns.so.1 (0x00007fad33265000)
        libcrypto.so.1.0.0 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.0.0 (0x00007fad32e6d000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fad32ae1000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fad328dd000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007fad326c6000)
        /lib64/ld-linux-x86-64.so.2 (0x00007fad334d8000)
root@dns2-sec ~/DOWNLOADS/ldns-1.6.17/drill # drill -TD security.debian.org @10.10.10.7
Warning: No trusted keys were given. Will not be able to verify authenticity!
^C
root@dns2-sec ~/DOWNLOADS/ldns-1.6.17/drill # 

contact : @ychaouche yacinechaouche at yahoocom


QR Code
QR Code How to fix the "drill: error while loading shared libraries: libldns.so.1: cannot open shared object file: No such file or directory" error (generated for current page)