n27051538/solaris_exporter

can't solaris_exporter on solars11.3.36

Closed this issue · 3 comments

root@xxxxxxxxxx # /opt/csw/bin/pip install psutil==5.7.0
/opt/csw/bin/gcc-5.2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -m32 -fPIC -DPSUTIL_POSIX=1 -DPSUTIL_SIZEOF_PID_T=4 -DPSUTIL_VERSION=570 -DPSUTIL_SUNOS=1 -DNEW_MIB_COMPLIANT=1 -I/opt/csw/include/python2.7 -c psutil/_psutil_common.c -o build/temp.solaris-2.11-sun4v.32bit-2.7/psutil/_psutil_common.o
unable to execute '/opt/csw/bin/gcc-5.2': No such file or directory
error: command '/opt/csw/bin/gcc-5.2' failed with exit status 1

----------------------------------------

Command "/opt/csw/bin/python2.7 -u -c "import setuptools, tokenize;file='/tmp/pip-build-TxNAvo/psutil/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-KW04Mu-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-TxNAvo/psutil/
You are using pip version 8.1.2, however version 22.0.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@xxxxxxxx # ls -ld /opt/csw/bin/gcc-5.2
/opt/csw/bin/gcc-5.2: No such file or directory
root@xxxxxxxx # gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/gcc/5/lib/gcc/sparcv9-sun-solaris2.11/5.4.0/lto-wrapper
Target: sparcv9-sun-solaris2.11
Configured with: /builds/ul11u3sru-gate/components/gcc5/gcc-5.4.0/configure CC='/usr/gcc/4.7/bin/gcc -m64' CXX='/usr/gcc/4.7/bin/g++ -m64' --prefix=/usr/gcc/5 --mandir=/usr/gcc/5/share/man --bindir=/usr/gcc/5/bin --libdir=/usr/gcc/5/lib --sbindir=/usr/gcc/5/sbin --infodir=/usr/gcc/5/share/info --libexecdir=/usr/gcc/5/lib --enable-languages=c,c++,fortran,objc --enable-shared --enable-initfini-array --disable-rpath --with-system-zlib --with-build-config=no --with-gmp-include=/usr/include/gmp --with-mpfr-include=/usr/include/mpfr --without-gnu-ld --with-ld=/usr/bin/ld --with-gnu-as --with-as=/usr/gnu/bin/as 'BOOT_CFLAGS=-g -O2' sparcv9-sun-solaris2.11
Thread model: posix
gcc version 5.4.0 (GCC)
root@xxxx #

root@xxxxxxx # pkg info entire
Name: entire
Summary: entire incorporation including Support Repository Update (Oracle Solaris 11.3.36.24.0).
Description: This package constrains system package versions to the same
build. WARNING: Proper system update and correct package
selection depend on the presence of this incorporation.
Removing this package will result in an unsupported system.
For more information see:
https://support.oracle.com/rs?type=doc&id=2433413.1
Category: Meta Packages/Incorporations
State: Installed
Publisher: solaris
Version: 0.5.11 (Oracle Solaris 11.3.36.24.0)
Build Release: 5.11
Branch: 0.175.3.36.0.24.0
Packaging Date: Wed Jan 13 20:40:04 2021
Size: 5.46 kB
FMRI: pkg://solaris/entire@0.5.11,5.11-0.175.3.36.0.24.0:20210113T204004Z
root@xxxxxxxxxx #

The problem is in absent file
/opt/csw/bin/gcc-5.2
Try to create links from installed gcc-5.4 or install gcc-5.2.

Also you could open support ticket for psutil - you have problems with its installation: https://github.com/giampaolo/psutil

Hi
update below still not success.
root@xxxxxxxxx # /opt/csw/bin/pip2.7 install psutil==5.7.0
Collecting psutil==5.7.0
Using cached https://files.pythonhosted.org/packages/c4/b8/3512f0e93e0db23a71d82485ba256071ebef99b227351f0f5540f744af41/psutil-5.7.0.tar.gz
Installing collected packages: psutil
Found existing installation: psutil 5.9.0
Uninstalling psutil-5.9.0:
Successfully uninstalled psutil-5.9.0
Running setup.py install for psutil ... done
Successfully installed psutil-5.7.0
You are using pip version 8.1.2, however version 22.0.4 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
root@xxxxxxxxx # /opt/csw/bin/python2.7 solaris_exporter.py
Traceback (most recent call last):
File "solaris_exporter.py", line 133, in
from prometheus_client.core import REGISTRY, Counter, Gauge, GaugeMetricFamily, CounterMetricFamily, UntypedMetricFamily
File "/opt/csw/lib/python2.7/site-packages/prometheus_client/init.py", line 3, in
from . import (
File "/opt/csw/lib/python2.7/site-packages/prometheus_client/exposition.py", line 113
def make_wsgi_app(registry: CollectorRegistry = REGISTRY, disable_compression: bool = False) -> Callable:
^
SyntaxError: invalid syntax
root@xxxxxxxxx #

root@xxxxxxxxx # /opt/csw/bin/python3.3 solaris_exporter.py
Traceback (most recent call last):
File "solaris_exporter.py", line 130, in
import psutil
ImportError: No module named 'psutil'
root@xxxxxxxxx #

Actually I already installed 3 servers pass 2/3 not sure why this server not success.

Hi,
now is done below my step to install.

wget https://bootstrap.pypa.io/pip/3.3/get-pip.py
/opt/csw/bin/python3.3 get-pip.py
/opt/csw/bin/pip3.3 install prometheus_client
/opt/csw/bin/pip3.3 install psutil
export LANG=C
/opt/csw/bin/python3.3 solaris_exporter.py

Thanks.