Nagios plugin – Error “No such file or directory”

When trying to execute a nagios plugin, you’re getting this error:

# /usr/lib/nagios/plugins/check_procs 
bash: /usr/lib/nagios/plugins/check_procs: No such file or directory

But when checking further, the file does exist:

# ls -l /usr/lib/nagios/plugins/check_procs 
-rwxr-xr-x 1 root root 124929 Jan 19  2016 /usr/lib/nagios/plugins/check_procs

This can be due to some 32 bit libc libraries missing. To fix that, you will have to install the 32-bit shared libraries for AMD64 by installing this package:

libc6-i386

And now, you can try again, error should have gone away!

# /usr/lib/nagios/plugins/check_procs 
PROCS OK: 152 processes|procs=152;-1;-1;0