glpi-project / glpi-agent

GLPI Agent
GNU General Public License v2.0
240 stars 60 forks source link

Error on install: Can't locate object method "open_os_file" via package "self" (perhaps you forgot to load "self"?) at glpi-agent-1.6.1-linux-installer.pl line 589 #549

Closed chri-bra closed 10 months ago

chri-bra commented 10 months ago

Bug reporting acknowledgment

Not applicable

Professional support

Still not applicable

Describe the bug

Hi there

I wanted to install the new glpi-agent 1.6.1 on Ubuntu 22.04 LTS. At the end of the installation a error message appears.

Setting up glpi-agent-task-deploy (1:1.6.1-1) ...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
Processing triggers for man-db (2.10.2-1) ...
Package profile updates
        status: 1
        updates: []
        exceptions:

Applying configuration...
Can't locate object method "open_os_file" via package "self" (perhaps you forgot to load "self"?) at /tmp/glpi-agent-1.6.1-linux-installer.pl line 589.
Cleaning extracted packages

Line 589 is my $fh = self->open_os_file($installed_config, '>')

I think, that there is only a dollar "$" missing. With this modification the installer ist running without error message. my $fh = $self->open_os_file($installed_config, '>')

Best regards Christian

To reproduce

perl glpi-agent-1.6.1-linux-installer.pl --reinstall --tag=SERVER --type=all --server=https://glpi.contoso.com/plugins/glpiinventory/ -v

Expected behavior

No error message ;-)

Operating system

Linux

GLPI Agent version

1.6.1

GLPI version

Not applicable

GLPIInventory plugin or FusionInventory for GLPI plugin version

Not applicable

Additional context

No response

g-bougard commented 10 months ago

Hi @chri-bra

this issue has still been reported and fixed. You should have search in closed issues before submitting.

Actually, you can use nightly build without error.

A new release will be published before the end of this year.

chri-bra commented 10 months ago

Hi @g-bougard

Thank you for the fast reply. I'm sorry. I didn't see it... ;-)