NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

zwerdlds's avatar
zwerdlds
Follower
Mar 29, 2012

Help me get SortTV working!

Hi everyone!
I own a SPARC-based ReadyNas Duo (revision 1?) running RAIDiator 4.1.8. I'm decent when it comes to CLI, but not the best when it comes to dependency hell. My Duo is the slow-but-sure workhorse of my LAN, (theoretically) handling all the various media-related issues that require Read/Write access. My HTPCs are Read-Only, and I'd prefer to keep them that way.

My current roadmap is to install a Perl Script (module?) called SortTV. You can find more information about it here: <http://forum.xbmc.org/showthread.php?tid=75949>. Based on the configuration file, it's extremely powerful and fits my needs 100%. However, because it runs in Perl, there are (apparently) a whole bunch of dependencies that I'm totally unaware of and how to fulfill.

After downloading and decompressing the appropriate SortTV files, I modify the config file and try to run the main Perl script:
./sorttv.pl 


Which of course results in:

Can't locate File/Copy/Recursive.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at ./sorttv.pl line 45.
BEGIN failed--compilation aborted at ./sorttv.pl line 45.


Now, I've sort of figured out that I need to have CPAN installed, but there's not really a good source of information on how to get CPAN. I ASSUME it exists with the standard Perl compilation, so I thought I'd compile and install a new version of Perl. Beyond reading (somewhere) that installing Perl might break Frontview (something I'd LIKE to avoid), I've run into the same issue this young man has: <http://www.readynas.com/forum/viewtopic.php?f=35&t=58321> (where he talks about conflicting types for `syscall'). So I've decided maybe this isn't the best way to go.

So my questions to all you kind folks out there:
What is the best way to satisfy the dependencies given above given that the SPARC appears to not include CPAN?
Is there any way to get JUST CPAN that I've totally missed? It seems like a more elegant solution to the issues I'm encountering.

Thanks in advance!

5 Replies

Replies have been turned off for this discussion
  • Quickest w/o installing/building/breaking anything is to just download the missing file:

    sudo mkdir -p /usr/share/perl5/File/Copy && sudo wget http://api.metacpan.org/source/DMUEY/Fi ... cursive.pm -O /usr/share/perl5/File/Copy/Recursive.pm

    Of course, if Recursive.pm have dependencies on other Perl modules that you don't have then you'd have to do the same thing for that module. Cheers!
  • Hi,

    Busy with the same.

    I have sshRoot and Apt extras installed on my nas, and on RAIDiator 4.1.8 [1.00a043]

    To solve
    Can't locate File/Copy/Recursive.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at ./sorttv.pl line 47

    I did
    apt-get install libfile-copy-recursive-perl

    this then leads to:

    Can't locate URI.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at (eval 8) line 3.

    solved with:

    apt-get install liburi-perl

    which then leads to :

    Can't locate TVDB/API.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at ./sorttv.pl line 53.

    - currently trying to solve this one....
  • Some further progress

    First perl version check, as I beleive newer verson of perl will break FrontView ??
    nas:~# perl -v
    This is perl, v5.8.8 built for sparc-linux

    Cpan check
    nas:~# cpan -v
    -bash: cpan: command not found

    Make sure you have the apt-get extra installed. (I thought I had, but must have forgotten after I last had to reset back to standard firmware some time ago, after i broke stuff badly)

    Then:
    apt-get update
    apt-get --reinstall install perl perl-base perl-modules perl-doc

    Check perl version:
    nas:~# perl -v
    This is perl, v5.8.8 built for sparc-linux

    :) Great, still same version of perl

    nas:~# cpan -v
    cpan script version 1.03
    CPAN.pm version 1.7602

    :) CPAN now installed

    First need to setup a build environment on the NAS.
    Follow this guide: http://www.readynas.com/?p=145
    Fix cc (missing) simply by linking it to gcc, else CPAn will not be able to build.
    cd /usr/bin
    ln -s ./gcc ./cc

    Start and configure CPAN

    nas:~# perl -MCPAN -e shell
    and configure CPAN - use defaults, they work fine, however I changed:

    Policy on building prerequisites (follow, ask or ignore)? [ask] follow

    Now install the missing required libs for sortTv using CPAN

    at the cpan shell promt do:

    install TVDB::API (go have some more beer, maybe pass out, come back the next day - this takes REALLY long)

    Ok, failed with XML::Parser not installing. (at this point I lost my text here, due to page timeout - thank god for a saved draft), so the rest is from memory and my shell history)

    The issue with installing XML::Parser was XML::Sax, and it seemed there was a clash between CPAN version and debian lib, so I uninstalled the debian version

    apt-get remove libxml-sax-perl
    also need dev files for expat so install them with apt-get install libexpat1-dev

    now force install of XML::Parser using : force install XML::Parser in CPAN, then try and install TVDB::API again

    The next thing was to install (via CPAN) the WWW::TheMovieDB::Search module.
    But it needs Perl 5.8.9 (and we have 5.8.8).
    As it is a minor version difference, I opted to cheat and force install of the module for 5.8.8. If this is an issue, it will be discovered later.

    cd /root/.cpan/build/WWW-TheMovieDB-Search
    edit lib/WWW/TheMovieDB/Search.pm AND Makefile.PL and change 5008009 to 5008008
    Build it manually
    perl ./Makefile.PL
    make
    make install


    Next
    cpan install Getopt::Long
    and
    cpan install File::Path

    at this point it kinda starts to run, and fails with

    nas:# ./sorttv.pl

    SortTV
    ~~~~~~
    DRY RUN MODE: No file operations will occur on the to-sort directory, some directories may be created at the destination.
    File does not exist: 501 Can't locate object method "new" via package "LWP::Protocol::http"
    at /usr/local/share/perl/5.8.8/TVDB/API.pm line 271.

    ANd now it is time to go to sleep....
  • The last error solved by :

    apt-get install libwww-perl

    And now sorttv works :)
  • New issue:

    SortTV fails at times with:

    /usr/bin/perl: relocation error: /usr/lib/perl5/auto/HTML/Parser/Parser.so: undefined symbol: Perl_Tstack_sp_ptr

    Fixed with:

    apt-get remove libhtml-parser-perl
    Reading Package Lists... Done
    Building Dependency Tree... Done
    The following packages will be REMOVED:
    libhtml-parser-perl libhtml-tree-perl libwww-perl
    0 upgraded, 0 newly installed, 3 to remove and 77 not upgraded.
    Need to get 0B of archives.
    After unpacking 1847kB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ...
    dpkg: serious warning: files list file for package `squeezecenter-readynas' missing, assuming package has no files currently installed.
    15506 files and directories currently installed.)
    Removing libwww-perl ...
    Removing libhtml-tree-perl ...
    Removing libhtml-parser-perl ...


    Then install the updated cpan version

    cpan install Bundle::LWP

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More