Skip to content

[HOWTO] Use an older version of Perl to solve the "ticks" in RRD graphs #415

@gilarelli

Description

@gilarelli

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

  1. 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.

  1. 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

  1. 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

  1. 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

  1. 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 :
2024-10-23 16-59-33
2024-10-23 17-01-57
2024-10-23 17-04-07
2024-10-23 17-09-15

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions