Page 1 of 1

check_ncpa.py error /usr/bin/env: python : no such file or d

Posted: Sun Nov 05, 2017 11:13 am
by Sailingbikeruk
I hope this is the right place on the forums.

I have Nagios Core 4 running on Ubuntu 16.04.3 LTS - I have two windows hosts running NSClient which are working OK

Ive installed the ncpa agent on a windows server 2012 and have downloaded the ncpa plugin using the instruction at this site https://assets.nagios.com/downloads/nag ... ndows.html

when I try to run /usr/local/nagios/libexec/check_ncpa.py -V (or any other command) I get the following error:

/usr/bin/env: 'python': No such file or directory

I have run dos2unix ./check_ncpa.py to remove any windows characters

if I run python -V i get:

The program 'python' can be found in the following packages:
* python-minimal
* python3



if I run Python3 -V I get:

Python 3.5.2


can anyone help?

Re: check_ncpa.py error /usr/bin/env: python : no such file

Posted: Mon Nov 06, 2017 3:07 pm
by lmiltchev
What do you see when you run:

Code: Select all

which python
command in the CLI?

Most probably you have only python 3 installed. Try installing python 2.7 as well:

Code: Select all

sudo apt-get install python2.7-minimal