"Bad interpreter" error on Red Hat installation

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jwestlake
Posts: 21
Joined: Wed Oct 17, 2012 12:44 pm

"Bad interpreter" error on Red Hat installation

Post 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!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: "Bad interpreter" error on Red Hat installation

Post 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=??
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: "Bad interpreter" error on Red Hat installation

Post 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
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
jwestlake
Posts: 21
Joined: Wed Oct 17, 2012 12:44 pm

Re: "Bad interpreter" error on Red Hat installation

Post 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?
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: "Bad interpreter" error on Red Hat installation

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked