Error Librenms not working

Hi,

I have this error :

Fatal error: Declaration of App\Application::publicPath() must be compatible with Illuminate\Foundation\Application::publicPath($path = ‘’) in /data/librenms/app/Application.php on line 35

laravel version 5.8
LibreNMS | 1.63-57-g0040f38d1
DB Schema | Not Connected (0)
PHP | 8.1.2-1ubuntu2.17
Python | 3.10.12
MySQL | ?
RRDTool | 1.7.2
SNMP | NET-SNMP 5.9.1
I use Mariadb and is working

Thanks !

1 Like

I’d suggest going back through the install docs and redoing each step (should be a copy / paste job).

Hello,
Sorry I did not specify but before this error LibreNMS worked well I had several equipment poller on it (about 5-6 months of operation without error).

My response is still the same, go back through the docs just don’t delete anything like your database, rrd file or config files. You can re-paste the commands to run with no issues.

Does LibreNMS 1.63 even support PHP 8.1? I suggest running a more recent version of LibreNMS. 4 years old is a bit much.

1 Like

Hi,
When i try to upgrade LibreNMS with ./daily.sh like in the doc this appear :

./daily.sh
PHP Fatal error: Cannot redeclare clean() (previously declared in /data/librenms/vendor/mews/purifier/src/helpers.php:4) in /data/librenms/includes/common.php on line 1332

i’m lost…

How big is your DB? and how many devices? My suggestion would be to make a bare Ubuntu 24.4 VM completely run though the new install. Make the new db and then use a program like DBeaver to do a dump of the old and an import to the new.

  1. Delete the vendor folder.
  2. Run git pull to update code
  3. Run ./scripts/composer_wrapper.php install --no-dev
  4. Run ./daily.sh