20.04 OVA Missing php-pear for Weathermap

Hello folks,

I had some trouble getting Weathermap to run properly in the ova deployment, turns out it was missing php-pear. I found the issues by running:

librenms@librenms:~/html/plugins/Weathermap$ ./weathermap.php --config config/test.conf --output output/test.png --htmloutput output/test.html

And I got back:

PHP Warning:  require_once(Console/Getopt.php): failed to open stream: No such file or directory in /opt/librenms/html/plugins/Weathermap/weathermap.php on line 8
PHP Fatal error:  require_once(): Failed opening required 'Console/Getopt.php' (include_path='.:/usr/share/php') in /opt/librenms/html/plugins/Weathermap/weathermap.php on line 8

A bit of googling led to it looking like php-pear was missing. I added it back in with sudo apt install php-pear and it’s running smoothly now.

Hope that helps someone.

Best, Chap

Ha, I knew I would forget something when updating the build system!

Not sure how I missed that when it’s the first thing on the Installing Weathermap documentation page. “Network-WeatherMap requires php pear to work.”

In my defense, it I couldn’t find where it was installed on the old OVA

It should be a simple fix to add it in to the build system, at scripts/ubuntu/librenms.sh the top of the file all the package based dependencies are installed, adding php-pear there will get it integrated. I’m very busy/overloaded with work this week, so I’m not sure if I will get to do it soon, maybe it can be added as an errata to the release notes for it or someone else can add it in and submit a PR.

1 Like

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