./daily.sh errors after updating to PHP 8.2

  • The output of ./validate.php
    ===========================================
    Component | Version
    --------- | -------
    LibreNMS | 22.11.0-21-g47cc169f4 (2022-12-12T08:02:49+00:00)
    DB Schema | 2022_09_03_091314_update_ports_adsl_table_with_defaults (248)
    PHP | 8.2.0
    Python | 3.9.2
    Database | MariaDB 10.5.15-MariaDB-0+deb11u1
    RRDTool | 1.7.2
    SNMP | 5.9
    ===========================================

[OK] Composer Version: 2.4.4
[OK] Dependencies up-to-date.
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[OK] Active pollers found
[OK] Dispatcher Service not detected
[OK] Locks are functional
[OK] Python poller wrapper is polling
[OK] Redis is unavailable
[OK] rrd_dir is writable
[OK] rrdtool version ok

I built a new clean Debian 11 server a month ago and did a clean install

A few days ago I ran a apt update && apt upgrade and the upgrade installed PHP 8.2

Now when ./daily runs I get the following error, can anyone help me resolve the errors

LibreNMS\ComposerHelper::preInstall
[32mInstalling dependencies from lock file [39m [32mVerifying lock file contents can be installed on current platform. [39m [37;41mYour lock file does not contain a compatible set of packages. Please run composer update. [39;49m

Problem 1
- fgrosse/phpasn1 is locked to version v2.4.0 and an update of this package was not requested.
- fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 ||
~7.4.0 || ~8.0.0 || ~8.1.0 → your php version (8.2.0) does not satisfy that requirement.
Problem 2
- fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 ||
~7.4.0 || ~8.0.0 || ~8.1.0 → your php version (8.2.0) does not satisfy that requirement.
- web-token/jwt-core v2.2.11 requires fgrosse/phpasn1 ^2.0 → satisfiable by fgrosse/phpasn1[v2.4.0].
- web-token/jwt-core is locked to version v2.2.11 and an update of this package was not requested.

I don’t think anyone has tested PHP 8.2 yet. Probably not all dependencies are ready yet.

Hi murrant
My install is working great with PHP 8.2 after I updated a few files (librenms.conf and librenms.vhost)

Its just the ./daily.sh updates that are failing

it lives on a cache from php 8.1 packages. A install from scratch won’t work for example.

I have same problem. I run LibreNMS on debian and my php got updated from version 8.1 to version 8.2. I’ve managed to run it on 8.2 version but my daily.sh has this error.

Updating Composer packages FAIL

LibreNMS\ComposerHelper::preInstall
Installing dependencies from lock file
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

Problem 1
- fgrosse/phpasn1 is locked to version v2.4.0 and an update of this package was not requested.
- fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 → your php version (8.2.0) does not satisfy that requirement.
Problem 2
- fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 → your php version (8.2.0) does not satisfy that requirement.
- web-token/jwt-core v2.2.11 requires fgrosse/phpasn1 ^2.0 → satisfiable by fgrosse/phpasn1[v2.4.0].
- web-token/jwt-core is locked to version v2.2.11 and an update of this package was not requested.

Has anyone found solution for this?

Hi. Same here, Debian11, same output

I managed to get it working with a clean install on PHP 8.2 by force updating composer:

su - librenms
export FORCE=1
composer update

Disclaimer: I don’t know what I’m doing with composer, it just looked like it worked (no errors)

Ran the above commands and my install cannot find “composer” so I ran

  • ./scripts/composer_wrapper.php update then ./daily and I still get the same error with (even tried * ./scripts/composer_wrapper.php install --no-dev but till the same - below error wth running ./daily.sh)

Problem 1

  • fgrosse/phpasn1 is locked to version v2.4.0 and an update of this package was not requested.
  • fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 → your php version (8.2.0) does not satisfy that requirement.
    Problem 2
  • fgrosse/phpasn1 v2.4.0 requires php ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 → your php version (8.2.0) does not satisfy that requirement.
  • web-token/jwt-core v2.2.11 requires fgrosse/phpasn1 ^2.0 → satisfiable by fgrosse/phpasn1[v2.4.0].
  • web-token/jwt-core is locked to version v2.2.11 and an update of this package was not requested.

Try ./composer.phar update instead of composer update then

Forcing a composer update won’t fix anything, it just ignores the problem.

The problem is the composer.lock file needs to be updated on Git to reflect the PHP 8.2 update (package fgrosse/phpasn1 – line 1281). The devs are now aware of the issue, so expect a fix coming within the next few days. I wouldn’t worry about it at all until then.

I’d say if your installation is working fine on 8.2 (just failing auto-updates), you are good to go. If you’re just installing LibreNMS today on Debian 11, things could get sticky, and a composer force update would be warranted.

I did say I don’t know what I’m doing with composer! But yes indeed I was installing new on Debian 11.

Greetings,

I saw there hasn’t been any updates to the necessary files, so I started a pull request myself.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.