WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: OCS Inventory on TC 13.x  (Read 3430 times)

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
OCS Inventory on TC 13.x
« on: January 30, 2023, 03:02:42 AM »
Hi There,

i am trying to install OCS Inventory NG Agent 2.x  https://wiki.ocsinventory-ng.org/03.Basic-documentation/Setting-up-the-UNIX-agent-manually-on-client-computers/

I don't think that all the Requirements are in the repository.


PERL 5.8 and higher                      -->  perl5.tcz ?
Perl module XML::Simple               -->  perl_xml_simple.tcz ?
Perl module Compress::Zlib           --> zlib_base-dev.tcz ?
Perl module Net::IP                       --> ?
Perl module LWP::UserAgent          --> ?
Perl module Digest::MD5               --> ?
Perl module Net::SSLeay               --> ?
Perl module Data::UUID                --> ?
dmidecode                                    --> dmidecode.tcz
lspci on Linux and *BSD (pciutils package)   --> libpci.tcz ?
Make utility                                               --> make.tcz
C/C++ compiler like GNU GCC                     --> gcc.tcz


the installed Modules right now:

Code: [Select]
instmodsh
Available commands are:
   l            - List all installed modules
   m <module>   - Select a module
   q            - Quit the program
cmd? l
Installed modules are:
   Bundle::NetSNMP
   Perl

thank you for helping

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: OCS Inventory on TC 13.x
« Reply #1 on: January 30, 2023, 03:16:43 AM »
As per the info file the perl5 extension in tc-13.x is 5.32.0

For the missing perl modules, you can either compile them or install them using cpan

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: OCS Inventory on TC 13.x
« Reply #2 on: January 30, 2023, 05:44:15 AM »
Hi Juanito,

when i try to install a Module i get the error "Make -- not ok"

Code: [Select]
install local::lib

Reading '/home/tc/.cpan/Metadata'
  Database was generated on Mon, 30 Jan 2023 08:54:00 GMT
Running install for module 'local::lib'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.093)
Checksum for /opt/Scripts/cpan_sources/authors/id/H/HA/HAARG/local-lib-2.000029.tar.gz ok
Scanning cache /home/tc/.cpan/build for sizes
............................................................................DONE
local-lib-2.000029/
local-lib-2.000029/inc/
local-lib-2.000029/README
local-lib-2.000029/Changes
local-lib-2.000029/MANIFEST
local-lib-2.000029/LICENSE
local-lib-2.000029/t/
local-lib-2.000029/xt/
local-lib-2.000029/META.yml
local-lib-2.000029/META.json
local-lib-2.000029/lib/
local-lib-2.000029/maint/
local-lib-2.000029/eg/
local-lib-2.000029/Makefile.PL
local-lib-2.000029/eg/scripted_install.pl
local-lib-2.000029/maint/Makefile.PL.include
local-lib-2.000029/lib/POD2/
local-lib-2.000029/lib/local/
local-lib-2.000029/lib/lib/
local-lib-2.000029/lib/lib/core/
local-lib-2.000029/lib/lib/core/only.pm
local-lib-2.000029/lib/local/lib.pm
local-lib-2.000029/lib/POD2/DE/
local-lib-2.000029/lib/POD2/PT_BR/
local-lib-2.000029/lib/POD2/PT_BR/local/
local-lib-2.000029/lib/POD2/PT_BR/local/lib.pod
local-lib-2.000029/lib/POD2/DE/local/
local-lib-2.000029/lib/POD2/DE/local/lib.pod
local-lib-2.000029/xt/install.t
local-lib-2.000029/xt/cpan-bootstrap.t
local-lib-2.000029/xt/author/
local-lib-2.000029/xt/bootstrap.t
local-lib-2.000029/xt/release/
local-lib-2.000029/xt/cpan-bootstrap.pl
local-lib-2.000029/xt/lib/
local-lib-2.000029/xt/lib/dist_util.pm
local-lib-2.000029/xt/release/no-tabs.t
local-lib-2.000029/xt/release/eol.t
local-lib-2.000029/xt/author/pod-syntax.t
local-lib-2.000029/xt/author/cpan-changes.t
local-lib-2.000029/t/shell.t
local-lib-2.000029/t/bad_variables.t
local-lib-2.000029/t/carp-mismatch.t
local-lib-2.000029/t/subroutine-in-inc.t
local-lib-2.000029/t/taint-mode.t
local-lib-2.000029/t/stackable.t
local-lib-2.000029/t/lib/
local-lib-2.000029/t/pipeline.t
local-lib-2.000029/t/classmethod.t
local-lib-2.000029/t/de-dup.t
local-lib-2.000029/t/lib-core-only.t
local-lib-2.000029/t/lib/TempDir.pm
local-lib-2.000029/t/lib/ENVDumper.pm
local-lib-2.000029/inc/CheckVersion.pm
local-lib-2.000029/inc/CPANBootstrapper.pm
'YAML' not installed, will not store persistent state
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
Configuring H/HA/HAARG/local-lib-2.000029.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for local::lib
Writing MYMETA.yml and MYMETA.json
  HAARG/local-lib-2.000029.tar.gz
  /usr/local/bin/perl Makefile.PL -- OK
Running make for H/HA/HAARG/local-lib-2.000029.tar.gz
CPAN: Module::CoreList loaded ok (v5.20200620)
make: Warning: File 'Makefile.PL' has modification time 87561258 s in the future
Makefile out-of-date with respect to Makefile.PL /usr/local/lib/perl5/5.32/core_perl/Config.pm /usr/local/lib/perl5/5.32/core_perl/CORE/config.h
Cleaning current config before rebuilding Makefile...
make -f Makefile.old clean > /dev/null 2>&1
"/usr/local/bin/perl" Makefile.PL
Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for local::lib
Writing MYMETA.yml and MYMETA.json
==> Your Makefile has been rebuilt. <==
==> Please rerun the make command.  <==
false
make: *** [Makefile:812: Makefile] Error 1
  HAARG/local-lib-2.000029.tar.gz
  /usr/local/bin/make -- NOT OK
Failed during this command:
 HAARG/local-lib-2.000029.tar.gz              : make NO

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: OCS Inventory on TC 13.x
« Reply #3 on: January 30, 2023, 05:58:07 AM »
It looks like you need to set your machine to the correct time/date and load the compiletc extension.

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: OCS Inventory on TC 13.x
« Reply #4 on: January 31, 2023, 01:20:52 AM »
thank you very much, you were right :)

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: OCS Inventory on TC 13.x
« Reply #5 on: January 31, 2023, 01:50:08 AM »
can you tell me how to keep all modules i installed persistent even after reboot ?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: OCS Inventory on TC 13.x
« Reply #6 on: January 31, 2023, 02:10:41 AM »
I would presume the modules are installed under /usr/local/lib/perl5/5.32/site_perl with perhaps some files under /usr/local/bin - I wouldn't advise adding these files to a backup though as it would slow down booting.

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: OCS Inventory on TC 13.x
« Reply #7 on: January 31, 2023, 03:07:21 AM »
but when i install OCS Iventory with " sudo make install"

doesn't i need all mudoles to be installed to use the Program OCS? Or i need them just to install the Program and then i can use it without the modules ?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: OCS Inventory on TC 13.x
« Reply #8 on: January 31, 2023, 03:20:21 AM »
I don't know.

You can try installing ocs inventory with "sudo make DESTDIR=/tmp/pkg install" and then look at /tmp/pkg to see what is installed.

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: OCS Inventory on TC 13.x
« Reply #9 on: February 06, 2023, 07:27:00 AM »
Hi Juanito,

with instmodsh i can create a tar file from the installed Modules.

do you know if i can install the module from the created tar file without using cpan ?

Code: [Select]
instmodsh
Available commands are:
   l            - List all installed modules
   m <module>   - Select a module
   q            - Quit the program
cmd? l
Installed modules are:
   Bundle::NetSNMP
   Ocsinventory::Unix::Agent
   Perl
cmd? m Bundle::NetSNMP
Available commands are:
   f [all|prog|doc]   - List installed files of a given type
   d [all|prog|doc]   - List the directories used by a module
   v                  - Validate the .packlist - check for missing files
   t <tarfile>        - Create a tar archive of the module
   h                  - Display module help
   q                  - Quit the module
Bundle::NetSNMP cmd?


Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: OCS Inventory on TC 13.x
« Reply #10 on: February 06, 2023, 07:38:03 AM »
I assume you can, but I’ve never tried.

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: OCS Inventory on TC 13.x
« Reply #11 on: February 06, 2023, 07:41:27 AM »
would you tell me a way to try ?

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: OCS Inventory on TC 13.x
« Reply #12 on: February 06, 2023, 07:53:36 AM »
I guess it depends on how the tar archive was created - if you list the contents, do they include the full path?

For example: usr/local/lib/perl5/5.32/site_perl/XML/Parser/Expat.pm

..or do they contain: XML/Parser/Expat.pm

Offline Rabie

  • Sr. Member
  • ****
  • Posts: 272
Re: OCS Inventory on TC 13.x
« Reply #13 on: February 06, 2023, 08:13:01 AM »
yes the include the full path when i extract the tar file like

Code: [Select]
tar xvpf Proc_Daemon.tar
tar: removing leading '/' from member names
usr/local/share/man/man3/Proc::Daemon.3
usr/local/lib/perl5/site_perl/Proc/Daemon.pm
usr/local/lib/perl5/site_perl/Proc/Daemon.pod




Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: OCS Inventory on TC 13.x
« Reply #14 on: February 06, 2023, 08:20:31 AM »
You should be able to test by extracting it in the root directory:
Code: [Select]
cp module.tcz.gz /
cd /
sudo tar xf module.tar.gz

..and then see if the module works.
« Last Edit: February 06, 2023, 08:56:34 AM by Juanito »