[HOWTO] Use an older version of Perl to solve the "ticks" in RRD graphs
Hey,
After months of tests, I finally manged to get rid of the biggest annoyance I had with RPIMonitor on newer debian: the incompatibility with newer versions of Perl.
I installed Perl from sources with the modules needed by RPIMonitor, and it works!
I followed this guide to install perl from sources: https://perlmaven.com/how-to-build-perl-from-source-code
References : #393 #385
- Download the sources
https://www.cpan.org/src/README.html https://www.cpan.org/src/5.0/perl-5.30.3.tar.gz
I couldn't compile Perl from the 5.28.3 sources, so I used the next one.
- Install in the folder of your choice - for me: /opt/perl-5.30.3
In the sources folder:
./Configure -des -Dprefix=/opt/perl-5.30.3
make
make test
make install
- Install CPAN Minus in the perl folder to install the needed modules
curl -L http://cpanmin.us | /opt/perl-5.30.3/bin/perl - App::cpanminus
- Install the modules for this old version of perl
/opt/perl-5.30.3/bin/cpanm File::Which
/opt/perl-5.30.3/bin/cpanm IPC::ShareLite
/opt/perl-5.30.3/bin/cpanm JSON
/opt/perl-5.30.3/bin/cpanm Alien::RRDtool
For this one, you'll maybe have to install dev dependencies (I had to - you'll find which ones in the log file):
apt install libcairo2-dev libpango1.0-dev libglib2.0-dev libxml2-dev
/opt/perl-5.30.3/bin/cpanm SNMP::Extension::PassPersist
- Replace the interpreter in the first line of /usr/bin/rpimonitord
Replace:
#!/usr/bin/perl
With:
#!/opt/perl-5.30.3/bin/perl
And restart rpimonitor!
Examples:
On the left: before, with perl v5.36.0 / On the right: with perl v5.30.3 :
You helps a lot! THKS