I have been trying to install this script for a while now. I run into problems, fix them run the script again get more errors and fix them too..
I'm running CentOS Linux release 7.9.2009 (Core) as i understand this release is supposed to work with the script.
Last issue i had was the pip install in the script solved that by finding another pip installation source:
In nsti-3.0.2/install/prereqs.sh i replaced:
this:
curl https://raw.githubusercontent.com/pypa/ ... get-pip.py | python
with this:
curl -L https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
I now run into problems that i have trouble to fix... Here is a bit of the installation output:
Could someone help me .. i think it failes here:
_mysql.c:44:23: fatal error: my_config.h: No such file or directory
#include "my_config.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
Code: Select all
Successfully installed pip-20.3.4
Checking installer prereqs...
-----------------------------
httpd-2.4.6-97.el7.centos.5.x86_64
gcc-4.8.5-44.el7.x86_64
wget-1.14-18.el7_6.1.x86_64
make-3.82-24.el7.x86_64
tar-1.26-35.el7.x86_64
net-snmp-5.7.2-49.el7_9.2.x86_64
net-snmp-utils-5.7.2-49.el7_9.2.x86_64
mod_wsgi-3.4-18.el7.x86_64
python-devel-2.7.5-92.el7_9.x86_64
-----------------------
INSTALLER PREREQS MET
-----------------------
Making sure WSGI is installed in Apache...
------------------------------------------
wsgi_module (shared)
---------------------
MOD_WSGI INSTALLED
---------------------
Creating users and groups...
----------------------------
nagios:x:1000:100::/home/nagios:/bin/bash
------------------
USERS/GROUPS OK
------------------
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021 . More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Collecting Flask
Downloading Flask-1.1.4-py2.py3-none-any.whl (94 kB)
Collecting MySQL-python
Downloading MySQL-python-1.2.5.zip (108 kB)
Collecting storm
Downloading storm-0.25.tar.gz (287 kB)
Collecting click<8.0,>=5.1
Downloading click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting Jinja2<3.0,>=2.10.1
Downloading Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Collecting Werkzeug<2.0,>=0.15
Downloading Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting itsdangerous<2.0,>=0.24
Downloading itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting six
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting MarkupSafe>=0.23
Downloading MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl (24 kB)
Building wheels for collected packages: MySQL-python, storm
Building wheel for MySQL-python (setup.py): started
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-z6i7ui/mysql-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-z6i7ui/mysql-python/setup. py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-whee l-YmnLdR
cwd: /tmp/pip-install-z6i7ui/mysql-python/
Complete output (30 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-2.7
copying _mysql_exceptions.py -> build/lib.linux-x86_64-2.7
creating build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/release.py -> build/lib.linux-x86_64-2.7/MySQLdb
copying MySQLdb/times.py -> build/lib.linux-x86_64-2.7/MySQLdb
creating build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/REFRESH.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.linux-x86_64-2.7/MySQLdb/constants
running build_ext
building '_mysql' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURC E -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fw rapv -fPIC -Dversion_info=(1,2,5,'final',1) -D__version__=1.2.5 -I/usr/include/mysql -I/usr/include/python2.7 -c _mysql.c -o build/temp.linux-x86_64-2.7/_mysql.o -m64
_mysql.c:44:23: fatal error: my_config.h: No such file or directory
#include "my_config.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for MySQL-python
Building wheel for MySQL-python (setup.py): finished with status 'error'
Running setup.py clean for MySQL-python
Building wheel for storm (setup.py): started
Building wheel for storm (setup.py): finished with status 'done'
Created wheel for storm: filename=storm-0.25-cp27-cp27mu-linux_x86_64.whl size=363646 sha256=5a48c297ebe7a97152af3f7f1db6e92a44569466b0954fec9930e3846bf75904
Stored in directory: /root/.cache/pip/wheels/2f/c4/40/5e0e1436871ef347468823a83ee8e50b0e507c4e03ada43875
Successfully built storm
Failed to build MySQL-python