2

I'm trying to run [pisg][1] on my raspberry pi, which is running archlinux arm, and every time I try to run it, I get:

   Root ~>pisg -cf pisg.conf
   Warning: Couldn't parse -cfg option
   Could not load pisg! Reason:
   Can't locate Pisg.pm in @INC (you may need to install the Pisg module) (@INC contains: /usr/bin/modules/ /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at (eval 1) line 2.
   BEGIN failed--compilation aborted at (eval 1) line 2.

which can be fixed by copying /usr/lib/pisg/modules/Pisg.pm to one of the directories listed as being included in @INC above. Then I get

Root ~>pisg -cf pisg.conf
Warning: Couldn't parse -cfg option
Could not load pisg! Reason:
Can't locate Pisg/Common.pm in @INC (you may need to install the Pisg::Common module) (@INC contains: /usr/bin/modules/ /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl .) at /usr/lib/perl5/site_perl/Pisg.pm line 43.

which /can't/ be fixed by linking Common.pm to the the above places. The program works fine on my archlinux pc, though..

Edit: I downloaded pisg from the sourceforge and that seems to work fine.. (it downloads already compiled or whatever it is you do with perl programs, and runs in the folder I downloaded in..) Also? I was wrong when I said it runs when I install it via the AUR on my pc, I just /forgot/ that I downloaded it from sourceforge, my bad. The package in the AUR must be broken or something.

3
  • 3
    Have you tried installing the relevant modules through cpanm?
    – terdon
    Aug 27, 2013 at 17:58
  • Sorry, I don't usually use perl programs, what is cpanm and how would I install the 'Common' module through it? I assumed that Pisg::Common was a module specific to pisg. I googled cpanm and found this, but there were no search results for "pisg" and there were /a lot/ of search results for 'common'..
    – OddOneIn
    Aug 27, 2013 at 18:06
  • @Benguin - You sure all your link modules have been compiled with an ARM compiler? x86-64 and ARM are entirely two different platforms.
    – Ramhound
    Aug 27, 2013 at 18:15

1 Answer 1

1

Your problems all refer to missing Perl Modules, think of them as an equivalent to C libraries, they are tools that facilitate certain jobs. Many programs make use of them and need a particular module to be installed in order to run.

Perl Modules live in the land of CPAN, the Comprehensive Perl Archive Network, a place of Geeks and Monks. So, when a Perl program complains about Can't locate foo/bar.pm in @INC, you should head on over to CPAN and find the relevant module. This can either be installed from source or by using one of a variety of helper programs around. Detailed instructions on installing Perl modules can be found here and in the references therein.

Briefly, to install Perl module Pisg::Common (since that is the one you are missing), you can do any of :

  • Run perl -MCPAN -e 'install Pisg::Common'

  • Install cpanm, it should be packaged for arch but if not, this should also work (source):

    cd /opt/
    curl https://raw.github.com/miyagawa/cpanminus/master/cpanm > cpanm
    chmod +x cpanm
    ln -s /opt/cpanm /usr/bin/
    cpanm --self-upgrade --sudo
    

    You can then install modules like so:

    cpanm Pisg::Common
    
2
  • I get: Warning: Cannot install Pisg::Common, don't know what it is. Try the command i /Pisg::Common/ to find objects with matching identifiers. Benguin ~>perl -MCPAN -e 'i /Pisg::Common/' syntax error at -e line 1, at EOF Execution of -e aborted due to compilation errors. Benguin ~>perl -MCPAN 'i /Pisg::Common/' Can't open perl script "i /Pisg::Common/": No such file or directory When I run that :s (Sorry for poor formatting, I couldn't get the line breaks to work with the double spaces?)
    – OddOneIn
    Sep 2, 2013 at 8:38
  • @Benguin no, I'm sorry. You're quite right, the module is not on CPAN. I could have sworn I had checked but apparently I hadn't. OK, could you edit your question to explain in detail what you have done please? Did you download the source from pisg's page? Could you try that?
    – terdon
    Sep 2, 2013 at 12:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .