Hi,
I want to check Librenms as an replacement for our very old OpenNMS system.
For my first steps i followed the install instructions from the online docu.
We use Alma Linux as an replacement for CentOS8 on dev and testing servers but as i came to the error point i switched to a native RHEL8 to make sure that Alma is not the problem.
This is the system:
[[email protected] ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux release 8.5 (Ootpa)
I followed the steps in the docu step by step and failed at this point:
[[email protected] ~]$ ./scripts/composer_wrapper.php install --no-dev
-bash: ./scripts/composer_wrapper.php: /usr/bin/env: bad interpreter: Operation not permitted
First idea, execute rights but:
[[email protected] ~]$ ll /usr/bin/env
-rwxr-xr-x. 1 root root 42304 Jul 9 16:34 /usr/bin/env
Second try SELinux, so set “setenforce 0” to check and the same error appears.
If i start the script as root:
[[email protected] librenms]# ./scripts/composer_wrapper.php install --no-dev
Do not run Composer as root/super user! See https://getcomposer.org/root for details
It will run but the message is right, i will not run it as root.
Additionally the package list in the docu is not complete because i get this error message if i run the script as root:
building 'psutil._psutil_linux' extension creating build/temp.linux-x86_64-3.6 creating build/temp.linux-x86_64-3.6/psutil gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=580 -DPSUTIL_LINUX=1 -DPSUTIL_ETHTOOL_MISSING_TYPES=1 -I/usr/include/python3.6m -c psutil/_psutil_common.c -o build/temp.linux-x86_64-3.6/psutil/_psutil_common.o unable to execute 'gcc': No such file or directory C compiler or Python headers are not installed on this system. Try to run: sudo yum install gcc python3-devel error: command 'gcc' failed with exit status 1 ----------------------------------------
Command “/usr/bin/python3.6 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-t66ge6g6/psutil/setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record /tmp/pip-cwxezhsq-record/install-record.txt --single-version-externally-managed --compile --user --prefix=” failed with error code 1 in /tmp/pip-build-t66ge6g6/psutil/
The python36-devel package has to be installed to compile the packages …
Has someone seen this bad interpreter error and has a solution for this?
Thanks for your help
Silvio