fusioninventory / fusioninventory-agent

FusionInventory Agent
http://fusioninventory.org/
GNU General Public License v2.0
254 stars 126 forks source link

How to install on TrueNas (FreeBSD)? #942

Closed C-Duv closed 2 months ago

C-Duv commented 3 years ago

I want to install the FI agent on a TrueNAS CORE system (based on FreeBSD), I have found the following TrueNas post:

https://www.truenas.com/community/threads/install-fusioninventory-agent-on-truenas-core.86432/

I then grabbed the .pkg file from the releases page and tried to install it with pkg install FusionInventory-Agent-2.5.2-1.pkg but it fails:

Updating local repository catalogue...
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!

So I tried the pkgsrc port (as per FusionInventory documentation):

sed -I '' 's/enabled: yes/enabled: no/' /usr/local/etc/pkg/repos/local.conf
sed -I '' 's/enabled: no/enabled: yes/' /usr/local/etc/pkg/repos/FreeBSD.conf
pkg install p5-FusionInventory-Agent

Which seemed to have installed just fine (with dependancies) but it fails to run:

zsh: /usr/local/bin/fusioninventory-agent: bad interpreter: /usr/local/bin/perl: no such file or directory

I do have perl installed, but as /usr/local/bin/perl5.30.3.

Is there a bug in the .pkg release (or incompatible OS)? Is the pkgsrc port compatible with TrueNAS? Can the agent be installed on TrueNAS?

Thanks

ddurieux commented 3 years ago

Seems normal, not have FreeBSD repository for ports in Free/True NAS. It must be packaged for it, but not have yet found the time to see how do this (I think there is something in the documenttion).

C-Duv commented 3 years ago

Thanks for the answer. BSD is not really my forte, so I wanted to avoid compiling/building (if I break something I might not be able to repair it). I know it's against TrueNAS philosophy to install additional packages on the OS (and not in a BSD Jail) but for monitoring I guess It's a legitimate exception.

I think there is something in the documenttion

In FI-Agent documentation?

g-bougard commented 3 years ago

Hi @C-Duv as you would have see in the release page description, the .pkg file is targeted for MacOSX. So don't expect it to work on any BSD.

Check this anyway in documentation.

ddurieux commented 3 years ago

I have Truenas at home and I don't recommand compile it on the system, because you will not have all tools to compile (and they must not be there).

C-Duv commented 3 years ago

Thanks, I'll check for TrueNAS/BSD users then (have a similar need for Prometheus Node Exporter)

nicolasbonnet commented 2 years ago

Do you find a solution for this case ? @C-Duv

C-Duv commented 2 years ago

Sadly I did not :'(

ddurieux commented 2 months ago

The next version will be available on BSD, Linux... and will works on TrueNas. I close because 3.0 version will be a completely rewritten agent.