centreon / centreon-plugins

Collection of standard plugins to discover and gather cloud-to-edge metrics and status across your whole IT infrastructure.
https://www.centreon.com
Apache License 2.0
310 stars 274 forks source link

Can't locate Convert/Binary/C.pm in @INC (you may need to install the Convert::Binary::C module) #4617

Closed lzmarouane closed 1 year ago

lzmarouane commented 1 year ago

Hi :) Can you help me please. Can't monitoring using NRPE plugin.

[root@centreon plugins]# . /usr/lib/nagios/centreon-plugins/centreon_plugins.pl --plugin=apps::protocols::nrpe::plugin --mode=query --custommode=nrpe --hostname=192.168.1.2 --command=check_exchange_replication

Can't locate Convert/Binary/C.pm in @INC (you may need to install the Convert::Binary::C module) (@INC contains: /usr/lib/nagios/centreon-plugins /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/x86_64-linux-gnu/perl5/5.32 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at /usr/lib/nagios/centreon-plugins/centreon/plugins/nrpe.pm line 26.
BEGIN failed--compilation aborted at /usr/lib/nagios/centreon-plugins/centreon/plugins/nrpe.pm line 26.
Compilation failed in require at /usr/lib/nagios/centreon-plugins/apps/protocols/nrpe/custom/nrpe.pm line 28.
BEGIN failed--compilation aborted at /usr/lib/nagios/centreon-plugins/apps/protocols/nrpe/custom/nrpe.pm line 28.
Compilation failed in require at /usr/lib/nagios/centreon-plugins/centreon/plugins/misc.pm line 222.

Perl module installed :

[root@centreon plugins]# cpan -i Convert::Binary::C

Loading internal logger. Log::Log4perl recommended for better logging
Reading '/var/lib/centreon-engine/.cpan/Metadata'
  Database was generated on Thu, 24 Aug 2023 15:17:01 GMT
Running install for module 'Convert::Binary::C'
Checksum for /var/lib/centreon-engine/.cpan/sources/authors/id/M/MH/MHX/Convert-Binary-C-0.84.tar.gz ok
'YAML' not installed, will not store persistent state
Configuring M/MH/MHX/Convert-Binary-C-0.84.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Building with feature 'ieeefp'
Finding dependencies...
Generating a Unix-style Makefile
Writing Makefile for Convert::Binary::C
Writing MYMETA.yml and MYMETA.json
  MHX/Convert-Binary-C-0.84.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for M/MH/MHX/Convert-Binary-C-0.84.tar.gz
  MHX/Convert-Binary-C-0.84.tar.gz
  make -- NOT OK
  No such file or directory

problem with path install ? Thanks for help.

DalfoCentreon commented 1 year ago

Hi! I'm pretty sure that every Perl libs needed by connectors could be installed as package. Now I have access only on a Debian, so I can give you only this example:

sudo apt install apt-file
sudo apt-file update
sudo apt-file search 'Convert/Binary/C.pm'
sudo apt install libconvert-binary-c-perl

On yum/dnf distro use <yum|dnf> provides

HTH

P.S. probably you will also miss 'Digest/CRC.pm'

lzmarouane commented 1 year ago

Hi @DalfoCentreon, Thank you, it's worked for me 👍