|
|
Can't locate <module> in @INC - but I can see module is there!
Hi
I'm running a program sa-learn that comes with SpamAssassin anti-spam s/w.
This script fails on this line:
require Mail::SpamAssassin::CmdLearn;
with a message saying the module can't be found in @INC. The print-out for
@INC includes:
Can't locate Mail/SpamAssassin/CmdLearn.pm in @INC (@INC contains:
/usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd
/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/5.6.1/i386-freebsd
/usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
/usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl)
and the module is installed in
usr/local/lib/perl5/site_perl/5.6.1/Mail/SpamAssassin/CmdLearn.pm
Is there any reason other than it not being there that a Perl require call
may fail?
Many thanks
Justin Wyllie
|
|
0
|
|
|
|
Reply
|
Justin
|
1/3/2005 6:39:41 PM |
|
Justin Wyllie wrote:
> Hi
>
> I'm running a program sa-learn that comes with SpamAssassin anti-spam s/w.
>
> This script fails on this line:
>
> require Mail::SpamAssassin::CmdLearn;
>
> with a message saying the module can't be found in @INC. The print-out for
> @INC includes:
>
>
> Can't locate Mail/SpamAssassin/CmdLearn.pm in @INC (@INC contains:
> /usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd
> /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/5.6.1/i386-freebsd
> /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
> /usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl)
>
> and the module is installed in
> usr/local/lib/perl5/site_perl/5.6.1/Mail/SpamAssassin/CmdLearn.pm
>
> Is there any reason other than it not being there that a Perl require call
> may fail?
>
> Many thanks
>
> Justin Wyllie
>
>
Justin,
Any reason you are using a 'require' instead of 'use'? I think 'use'
would probably solve your problem.
Otherwise, from looking at the error message, it looks like it may be a
path problem.
It says INC contains '/usr/local/lib/perl5/site_perl/5.6.1'. But, it is
trying to require 'Mail/SpamAssassin/CmdLearn.pm'. There is a missing /
between the library path and the module.
(It is looking for
'/usr/local/lib/perl5/site_perl/5.6.1Mail/SpamAssassin/CmdLearn.pm',
which doesn't exist.)
- Ken
|
|
0
|
|
|
|
Reply
|
Ken
|
1/3/2005 7:59:58 PM
|
|
>
> Justin,
>
> Any reason you are using a 'require' instead of 'use'? I think 'use'
> would probably solve your problem.
>
> Otherwise, from looking at the error message, it looks like it may be a
> path problem.
>
> It says INC contains '/usr/local/lib/perl5/site_perl/5.6.1'. But, it is
> trying to require 'Mail/SpamAssassin/CmdLearn.pm'. There is a missing /
> between the library path and the module.
>
> (It is looking for
> '/usr/local/lib/perl5/site_perl/5.6.1Mail/SpamAssassin/CmdLearn.pm',
> which doesn't exist.)
>
> - Ken
>
Hi Ken
Thanks for your reply. In fact after a bit more fiddling about I found the
problem was that the paths in my @INC are all relavtive to my chrooted jail
and I needed to put the full system path into @INC. Thanks for the
encouragement though
Justin
|
|
0
|
|
|
|
Reply
|
Justin
|
1/3/2005 9:39:31 PM
|
|
Ken <x3v0-usenet@yahoo.com> wrote:
: Justin Wyllie wrote:
: > I'm running a program sa-learn that comes with SpamAssassin anti-spam s/w.
: >
: > This script fails on this line:
: >
: > require Mail::SpamAssassin::CmdLearn;
: >
: > with a message saying the module can't be found in @INC. The print-out for
: > @INC includes:
:
: Any reason you are using a 'require' instead of 'use'? I think 'use'
: would probably solve your problem.
What misapprehension causes you to believe "use" can locate a file that
"require" cannot?
|
|
0
|
|
|
|
Reply
|
tiltonj
|
1/5/2005 4:25:01 AM
|
|
Ken <x3v0-usenet@yahoo.com> wrote in comp.lang.perl.misc:
> Justin Wyllie wrote:
> > Hi
> >
> > I'm running a program sa-learn that comes with SpamAssassin anti-spam s/w.
> >
> > This script fails on this line:
> >
> > require Mail::SpamAssassin::CmdLearn;
> >
> > with a message saying the module can't be found in @INC. The print-out for
> > @INC includes:
> >
> >
> > Can't locate Mail/SpamAssassin/CmdLearn.pm in @INC (@INC contains:
> > /usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd
> > /usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/5.6.1/i386-freebsd
> > /usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
> > /usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl)
> >
> > and the module is installed in
> > usr/local/lib/perl5/site_perl/5.6.1/Mail/SpamAssassin/CmdLearn.pm
> >
> > Is there any reason other than it not being there that a Perl require call
> > may fail?
> >
> > Many thanks
> >
> > Justin Wyllie
> >
> >
>
> Justin,
>
> Any reason you are using a 'require' instead of 'use'? I think 'use'
> would probably solve your problem.
I'd expect "use" to report exactly the same error as "require".
> Otherwise, from looking at the error message, it looks like it may be a
> path problem.
>
> It says INC contains '/usr/local/lib/perl5/site_perl/5.6.1'. But, it is
> trying to require 'Mail/SpamAssassin/CmdLearn.pm'. There is a missing /
> between the library path and the module.
>
> (It is looking for
> '/usr/local/lib/perl5/site_perl/5.6.1Mail/SpamAssassin/CmdLearn.pm',
> which doesn't exist.)
This is just wrong. It is looking for .../5.6.1/Mail/... . Please don't
post mere speculation.
Anno
|
|
0
|
|
|
|
Reply
|
anno4000
|
1/5/2005 6:51:04 PM
|
|
Anno Siegel wrote:
> Ken <x3v0-usenet@yahoo.com> wrote in comp.lang.perl.misc:
>
>>Justin Wyllie wrote:
>>
>>>Hi
>>>
>>>I'm running a program sa-learn that comes with SpamAssassin anti-spam s/w.
>>>
>>>This script fails on this line:
>>>
>>>require Mail::SpamAssassin::CmdLearn;
>>>
>>>with a message saying the module can't be found in @INC. The print-out for
>>>@INC includes:
>>>
>>>
>>>Can't locate Mail/SpamAssassin/CmdLearn.pm in @INC (@INC contains:
>>>/usr/local/lib/perl5/site_perl/5.6.1/i386-freebsd
>>>/usr/local/lib/perl5/site_perl/5.6.1 /usr/local/lib/perl5/5.6.1/i386-freebsd
>>>/usr/local/lib/perl5/5.6.1 /usr/local/lib/perl5/site_perl/5.005/i386-freebsd
>>>/usr/local/lib/perl5/site_perl/5.005 /usr/local/lib/perl5/site_perl)
>>>
>>>and the module is installed in
>>>usr/local/lib/perl5/site_perl/5.6.1/Mail/SpamAssassin/CmdLearn.pm
>>>
>>>Is there any reason other than it not being there that a Perl require call
>>>may fail?
>>>
>>>Many thanks
>>>
>>>Justin Wyllie
>>>
>>>
>>
>>Justin,
>>
>>Any reason you are using a 'require' instead of 'use'? I think 'use'
>>would probably solve your problem.
>
>
> I'd expect "use" to report exactly the same error as "require".
>
>
>>Otherwise, from looking at the error message, it looks like it may be a
>>path problem.
>>
>>It says INC contains '/usr/local/lib/perl5/site_perl/5.6.1'. But, it is
>>trying to require 'Mail/SpamAssassin/CmdLearn.pm'. There is a missing /
>>between the library path and the module.
>>
>>(It is looking for
>>'/usr/local/lib/perl5/site_perl/5.6.1Mail/SpamAssassin/CmdLearn.pm',
>>which doesn't exist.)
>
>
> This is just wrong. It is looking for .../5.6.1/Mail/... . Please don't
> post mere speculation.
>
> Anno
How about trying to copy CmdLearn.pm into .../5.6.1 dir and try use CmDLearn, just to see if it works and then continue dir by dir ?
PP
|
|
0
|
|
|
|
Reply
|
Peter
|
1/11/2005 10:34:19 AM
|
|
|
5 Replies
185 Views
(page loaded in 0.12 seconds)
Similiar Articles: T5220 can't load specfs - comp.unix.solarisCan't locate in @INC - but I can see module is there ... T5220 can't load specfs - comp.unix.solaris... disk@0,0 File and args: -v -m milestone=none module ... private key ... Linker Can't Find Library - comp.os.ms-windows.programmer.win32 ...Is there some method to make the install module use the same resources the other modules use when ... find entry symbol _start - comp.unix.programmer Linker Can't Find ... Convert month name to month number faster - comp.lang.python ...Can't locate in @INC - but I can see module is there ... Convert month name to month number faster - comp.lang.python ... I can see from the times you posted that you ... getting cpan configured - comp.unix.shellAlthough I thought to have saved my data, I see ... > >You're getting slaughtered there for good reason. ... I can't find the module on cpan... Regards Maciek ... Decompressing LZW compression from PDF file - comp.lang.ruby ...Hello, I'm trying to find a ruby module/code that can decompress LZW-compression-scheme from a PDF file. However, there is no such code or module... ImportError: DLL load failed: The specified module could not be ...ImportError: DLL load failed: The specified module ... Test1.py >tmp.txt 2>&1 In tmp.txt, I see ... Maybe that's what it can't find. > Well, there's no mention of ... procedure() pointer - comp.lang.fortranThat adds extra issues because the two modules can't reference ... that is a straightforward constraint - but I don't see any ordering requirement. Maybe I missed it. There ... PIX and router modules - comp.dcom.sys.ciscoI guess we'll just have to wait and see. The new 1800, 2800 and 3800 ... In that incarnation, it provides only firewall service; there is a separate module for VPN ... Finding High kernel CPU usage reason - comp.unix.solaris ...... to find out which modules ... and see if that identifies the route the hot point (if indeed there is one). This profiling can't identify all culprits, but it will find ... Windows API programming with gfortran or g95 - comp.lang.fortran ...If there hasn't been a module built for WinMain and friends specific for the particular ... win32 gcc version 4.5.0 20091217 (experimental) (GCC) Well, you can't see ... Perl error: Can't locate module in @INC | devdaily.com... Can't locate module in @INC ... there are a couple of things that can be ... to see if a Perl module is in your @INC path; Perl modules FAQ - What to do when Perl modules aren't ... A Guide to Installing Modules... failed to load: Can't locate foo/bar.pm in @INC.... Some modules ... To use the module you just need to add ~/lib to @INC. See Simple ... There's a CPAN module for that ... 7/25/2012 11:49:41 PM
|
|
|
|
|
|
|
|
|