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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Sailingbikeruk
Posts: 1
Joined: Sat Nov 04, 2017 3:56 am

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

Post 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?
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

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

Post 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  
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked