Page 1 of 1

"Bad interpreter" error on Red Hat installation

Posted: Thu Dec 20, 2012 3:31 pm
by jwestlake
Hey there,

I'm trying to get Nagios agent installed on RHEL 5.5 following the instructions here http://assets.nagios.com/downloads/nagi ... _Agent.pdf. I get as far as "./fullinstall" when I get this error:
[root@server linux-nrpe-agent]# ./fullinstall
bash: ./fullinstall: /bin/sh: bad interpreter: Permission denied
I'm su'd in as root, so it can't be a permissions thing. "sh" exists in /bin/sh... I can "sh" and change shells. If I try to run the script as such, I get more errors:
[root@server linux-nrpe-agent]# sh fullinstall
fullinstall: ./init.sh: /bin/sh: bad interpreter: Permission denied
Your system $PATH does not include /sbin and /usr/sbin. This is usually the result of installing GNOME rather than creating a clean system.
Adding /sbin and /usr/sbin to $PATH.
=================================================
Nagios Linux Agent Installer for Red Hat & CentOS
=================================================


This script will install the Nagios Linux Agent by executing all necessary
sub-scripts.

IMPORTANT: This script should only be used on a Red Hat or CentOS
system. Do NOT use this on a system running any other
distro or that does not allow additional package installation.

Do you want to continue? [Y/n] Y
Proceeding with installation...
Running './0-yum'...
fullinstall: ./0-yum: /bin/sh: bad interpreter: Permission denied
RESULT=126

===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).

If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.

The script that failed was: './0-yum'
To be fair, this is a server spun up on an external host that we're taking over monitoring for, so I'm not 100% sure its history, and I'm more familiar with Ubuntu than RHEL. What can I check to get this going?

Thanks!

Re: "Bad interpreter" error on Red Hat installation

Posted: Thu Dec 20, 2012 4:17 pm
by scottwilkerson
Can you open fullinstall in vi

Code: Select all

vi fullinstall
and then type

Code: Select all

:set ff
Then tell me what it says at the bottom of the terminal fileformat=??

Re: "Bad interpreter" error on Red Hat installation

Posted: Thu Dec 20, 2012 4:20 pm
by sreinhardt
Another option is to check /etc/fstab and make sure the partition containing /tmp has exec permissions. Feel free to post the contents of /etc/fstab if you would like, and we can take a look

Re: "Bad interpreter" error on Red Hat installation

Posted: Fri Dec 21, 2012 9:47 am
by jwestlake
Ah, that looks like it's the reason... /etc/fstab shows /tmp has noexec. I guess it'd be ok to copy to and install from another directory?

Re: "Bad interpreter" error on Red Hat installation

Posted: Fri Dec 21, 2012 10:27 am
by sreinhardt
Actually at this point, we do need it to be installed from /tmp as there are some checks that verify that, and some full paths used on install. This is due to some issues with installing sub
I should also point out, that you want to be sure you are installing on a vanilla, brand new, system or you may run into other issues such as this.