Wednesday , November 21 2018
Home / Network Admin / ld-linux.so.2 bad ELF interpreter: No such file or directory

ld-linux.so.2 bad ELF interpreter: No such file or directory

When I used “check_dig” plugin to monitor DNS Resolution on TMG Gateway server using NSClient++, I faced following error:

-bash: /usr/local/nagios/libexec/check_dig: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory

 

Solution:

To resolve this issue, first lets check what will provided ld-linux.so.2 file:

# yum whatprovides ld-linux.so.2

Result on CentOS 7 64bit is:

glibc-2.17-55.el7.i686 : The GNU libc libraries
Repo        : base
Matched from:
Provides    : ld-linux.so.2

glibc-2.17-55.el7_0.1.i686 : The GNU libc libraries
Repo        : updates
Matched from:
Provides    : ld-linux.so.2

Let’s install required Addon:

# yum install glibc-2.17-55.el7_0.1.i686

I’ve installed this as installing “glibc-2.17-55.el7.i686” gave me Error.

Now, test if the script is working now:

# /usr/local/nagios/libexec/check_dig -H 192.168.1.1

If following error is shown, it means “bind-utils” package is missing as it will use dig command and that is provided by bind-utils package.

check_dig: Could not parse arguments

Install Bind-Utils package:

# yum install bind-utils

Now test plugin again:

# /usr/local/nagios/libexec/check_dig -l google.com -H <GatewayIP>

i.e.

# /usr/local/nagios/libexec/check_dig -l google.com.pk -H 192.168.1.1

If all goes fine, following success message will be shown, DNS IPs will probably be changed for others.

DNS OK – 0.201 seconds response time (google.com.pk.  299 IN A 173.194.124.127)|time=0.201408s;;;0.000000

dig-success

Done

About Muhammad Attique

Check these out :)

How to Modify GRUB Bootloader version 2

I’m going to show you how can we edit and modify GRUB Bootloader version 2, …

Leave a Reply

Your email address will not be published. Required fields are marked *