harangzsolt33 has asked for the wisdom of the Perl Monks concerning the following question:
I'm not sure how to do this, so if I remember correctly, I need to write: sudo apt-get install Prima
Well, that didn't work. It says, there's no such program.
Okay, then I go to the CPAN website and find Prima and click on download. It downloaded a file called Prima-1.70.tar.gz. Then I opened the terminal and extracted it and moved all of its contents to /usr/share/perl5 which is one of the paths that showed up in the @INC list when I executed: perl -e "print join('--', @INC);" Then I searched for the word "Prima" on PerlMonks and copied and pasted the first example program I saw. I saved this file on my desktop. I called it menutest.pl and then I added the line #!/usr/bin/perl -w in the first line. I made sure the file is executable. I open terminal and try to run it: perl menutest.pl, and this is what it says:
Can't locate Prima.pm in @INC (you may need to install the Prima module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at menutest.pl line 6. BEGIN failed--compilation aborted at menutest.pl line 6.
If you look at this list, the location where I copied Prima's files is right there in the list: /usr/share/perl5
If I go to /usr/share/perl5/Prima/examples, I see a bunch of pl files there. If I try to run any one of them (i.e. perl grid.pl), it gives me the same error message.
What did I do wrong?
Oh wait. Prima.pm is actually not where it's supposed to be. Ok. I moved the pm files from /usr/share/perl5/Prima/Prima to /usr/share/perl5/Prima and then I copied Prima.pm to /usr/share/perl5. All right. Now, perl says it can't locate a "loadable object." What does that mean?
Can't locate loadable object for module Prima in @INC (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.36.0 /usr/local/share/perl/5.36.0 /usr/lib/x86_64-linux-gnu/perl5/5.36 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.36 /usr/share/perl/5.36 /usr/local/lib/site_perl) at menutest.pl line 6. Compilation failed in require at menutest.pl line 6. BEGIN failed--compilation aborted at menutest.pl line 6.
Arrgh!
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How do I install a Perl module?
by hippo (Archbishop) on Oct 28, 2023 at 12:18 UTC | |
Re: How do I install a Perl module?
by marto (Cardinal) on Oct 28, 2023 at 10:52 UTC | |
by haj (Vicar) on Oct 28, 2023 at 11:51 UTC | |
by marto (Cardinal) on Oct 28, 2023 at 12:11 UTC | |
by harangzsolt33 (Deacon) on Oct 28, 2023 at 16:17 UTC | |
by eyepopslikeamosquito (Archbishop) on Oct 29, 2023 at 00:31 UTC | |
by afoken (Chancellor) on Oct 29, 2023 at 14:40 UTC | |
by eyepopslikeamosquito (Archbishop) on Oct 30, 2023 at 02:46 UTC | |
by marto (Cardinal) on Oct 28, 2023 at 16:55 UTC | |
by hippo (Archbishop) on Oct 28, 2023 at 16:34 UTC | |
Re: How do I install a Perl module?
by haj (Vicar) on Oct 28, 2023 at 10:25 UTC | |
by harangzsolt33 (Deacon) on Oct 28, 2023 at 16:00 UTC |