Tvheadendzap2xml error

I installed OSMC yesterday on my pi3 with the express purpose of using it as a Tvheadend backend to service clients throughout the house. Just about everything is working as expected except EPG. I’ve looked online and found a lot of information and settled on zap2xml as a good route, but when I try to run the perl script “perl zap2xml.pl -u me@mymail -p xxxxxx” it gives me the following error.

Can’t locate JSON/XS.pm in @INC (you may need to install the JSON::XS module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/arm-linux-gnueabihf/perl5/5.20 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at (eval 17) line 2.

OK, so it’s missing a perl library. I’m very much out of my element when it comes to perl installation management. I tried what I thought would install CPAN, but I suspect something went wrong. Here’s what happened when I tried to install the JSON library

osmc@jubilee:~$ perl -MCPAN -e shell
Terminal does not support AddHistory.

cpan shell – CPAN exploration and modules installation (v2.05)
Enter ‘h’ for help.

cpan[1]> install JSON::XS
Reading ‘/home/osmc/.cpan/Metadata’
Database was generated on Sat, 04 Feb 2017 14:29:03 GMT
Running install for module ‘JSON::XS’
Checksum for /home/osmc/.cpan/sources/authors/id/M/ML/MLEHMANN/JSON-XS-3.03.tar.gz ok
Scanning cache /home/osmc/.cpan/build for sizes
…DONE
‘YAML’ not installed, will not store persistent state
---- Unsatisfied dependencies detected during ----
---- MLEHMANN/JSON-XS-3.03.tar.gz ----
Canary::Stability [build_requires]
Running install for module ‘Canary::Stability’
Checksum for /home/osmc/.cpan/sources/authors/id/M/ML/MLEHMANN/Canary-Stability-2012.tar.gz ok
Configuring M/ML/MLEHMANN/Canary-Stability-2012.tar.gz with Makefile.PL
Checking if your kit is complete…
Looks good
Generating a Unix-style Makefile
Writing Makefile for Canary::Stability
Writing MYMETA.yml and MYMETA.json
MLEHMANN/Canary-Stability-2012.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site – OK
Running make for M/ML/MLEHMANN/Canary-Stability-2012.tar.gz
Can’t exec “make”: No such file or directory at /usr/share/perl/5.20/CPAN/Distribution.pm line 2191.
MLEHMANN/Canary-Stability-2012.tar.gz
make – NOT OK
MLEHMANN/JSON-XS-3.03.tar.gz
Has already been unwrapped into directory /home/osmc/.cpan/build/JSON-XS-3.03-GDoI4Z
Warning: Prerequisite ‘Canary::Stability => 0’ for ‘MLEHMANN/JSON-XS-3.03.tar.gz’ failed when processing ‘MLEHMANN/Canary-Stability-2012.tar.gz’ with ‘make => NO’. Continuing, but chances to succeed are limited.
Configuring M/ML/MLEHMANN/JSON-XS-3.03.tar.gz with Makefile.PL
Can’t locate Canary/Stability.pm in @INC (you may need to install the Canary::Stability module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/arm-linux-gnueabihf/perl5/5.20 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl .) at Makefile.PL line 4.
BEGIN failed–compilation aborted at Makefile.PL line 4.
Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site]
MLEHMANN/JSON-XS-3.03.tar.gz
/usr/bin/perl Makefile.PL INSTALLDIRS=site – NOT OK
Failed during this command:
MLEHMANN/Canary-Stability-2012.tar.gz : make NO
MLEHMANN/JSON-XS-3.03.tar.gz : writemakefile NO ‘/usr/bin/perl Makefile.PL INSTALLDIRS=site’ returned status 512

And when I tried to run the perl command it gave me the same error so I’m guessing it didn’t work right.

And of course if anyone has a link to "here are the steps to get EPG working with zap2xml on OSMC running on a rapsberry pi, then that’s also helpful.

Did you look here?

https://discourse.osmc.tv/search?q=zap2xml

Of course. None of the topics discuss perl errors or working with cpan on the osmc platform

Google search turned this up https://www.reddit.com/r/raspberry_pi/comments/4th19b/problems_with_getting_tvheadend_to_work_with/d5i7l63/

Yes. That’s exactly what I’ve done, except, that I can’t seem to run the zap2it perl script because it is missing perl modules (notably JSON::XS). I need help getting these modules installed.

Did you not see the portion on “Installing dependencies”? You are confirming that you have done that?

Huzzah! A second pair of eyes to the rescue! I must have read over that a dozen times. I’m back in business.