Home: Fun With Perl: Perl Quizzes - Learn Perl the Fun Way:
can't locate pm file



chefchanyu
New User

Aug 28, 2011, 9:20 PM


Views: 97046
can't locate pm file

Hi:

I got dumper2.pm and dumper3.pl on server A same dir, when I run the dumper3.pl on server B via ssh "ssh me@serverA perl ~/dumper3.pl"
it came this error message:

Can't locate dumper2.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/i86pc-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i86pc-solaris /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /export/home/me/externalRRD/TEST/dumper3.pl line 7.
BEGIN failed--compilation aborted at /export/home/me/externalRRD/TEST/dumper3.pl line 7 (#1)
(F) You said to do (or require, or use) a file that couldn't be
found. Perl looks for the file in all the locations mentioned in @INC,
unless the file name included the full path to the file. Perhaps you
need to set the PERL5LIB or PERL5OPT environment variable to say where
the extra library is, or maybe the script needs to add the library name
to @INC. Or maybe you just misspelled the name of the file. See
perlfunc/require and lib.

Uncaught exception from user code:
Can't locate dumper2.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.8/i86pc-solaris /usr/local/lib/perl5/5.8.8 /usr/local/lib/perl5/site_perl/5.8.8/i86pc-solaris /usr/local/lib/perl5/site_perl/5.8.8 /usr/local/lib/perl5/site_perl .) at /export/home/me/externalRRD/TEST/dumper3.pl line 7.
BEGIN failed--compilation aborted at /export/home/d353202/externalRRD/TEST/dumper3.pl line 7.
at /export/home/me/externalRRD/TEST/dumper3.pl line 7


please help.


FishMonger
Veteran / Moderator

Aug 29, 2011, 9:26 AM


Views: 97037
Re: [chefchanyu] can't locate pm file

Where is the module located?

Do you have a 'use lib' statement in dumper3.pl?

Can you post the first 7 lines of the script?