Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Can't locate Term/ANSIColor.pm

34 views
Skip to first unread message

Pradeep

unread,
Sep 3, 2009, 1:40:16 AM9/3/09
to
Hi all,
I have installed the perl 5.8.8(ActivePerl-5.8.8.824-MSWin32-
x86-287188.msi from http://downloads.activestate.com/ActivePerl/Windows/5.8/)
and perl 5.8.9 also. I am getting the following error when my script
runs.
c:\perl\bin;c:\perl\lib;c:\perl\site\lib is already appended to PATH
env variable.

[exec] Can't locate Term/ANSIColor.pm in @INC (@INC contains: /
usr/lib/perl
5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /
usr/lib/per
l5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/
vendor_perl/5.8/cyg
win /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .)
at -e line
2.
[exec] BEGIN failed--compilation aborted at -e line 2.


Can anybody help me in this regard?


Thanks
Pradeep

sisyphus

unread,
Sep 3, 2009, 8:19:00 AM9/3/09
to
On Sep 3, 3:40 pm, Pradeep <bubunia2000s...@gmail.com> wrote:

> c:\perl\bin;c:\perl\lib;c:\perl\site\lib is already appended to PATH
> env variable.

The path should contain both c:\perl\bin and c:\perl\site\bin.
No point in adding c:\perl\lib and c:\perl\site\lib.

>      [exec] Can't locate Term/ANSIColor.pm in @INC (@INC contains: /
> usr/lib/perl
> 5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /
> usr/lib/per
> l5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/
> vendor_perl/5.8/cyg
> win /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .)
> at -e line
> 2.

This is cygwin perl, not ActivePerl. You probably need to *prepend*
(instead of *append*) c:\perl\bin and c:\perl\site\bin to the path.
That way, ActivePerl will be found before Cygwin perl.

Cheers,
Rob

Pradeep

unread,
Sep 3, 2009, 4:48:39 PM9/3/09
to

Iam new to Perl.Thanks Rob for your help. could you please clarify
what do u mean by prepend? Do you mean the @INC array needs to be
updated with perl path first and then cygwin perl path? If so could
you please let me how can I update the @INC array non progrmatically?

Tad J McClellan

unread,
Sep 3, 2009, 5:57:36 PM9/3/09
to
Pradeep <bubunia...@gmail.com> wrote:
> On Sep 3, 5:19�pm, sisyphus <sisyphus...@gmail.com> wrote:


>> This is cygwin perl, not ActivePerl. You probably need to *prepend*
>> (instead of *append*) c:\perl\bin and c:\perl\site\bin to the path.
>> That way, ActivePerl will be found before Cygwin perl.


> Iam new to Perl.


That does not require that we read Perl's documentation to you...

You should read up on a subject first to see if you can do it yourself.

You don't want to have to be running to Usenet every time a problem
comes up, you want to learn how to be independant enough to solve
problems without depending on others.


> please clarify
> what do u mean by prepend?


http://tinyurl.com/lrtprq


> Do you mean the @INC array


All of Perl's variables are documented in:

perldoc perlvar

so when you have a question about a Perl variable, you should
look up that variable there.


> needs to be
> updated with perl path first and then cygwin perl path? If so could
> you please let me how can I update the @INC array non progrmatically?


If you are having trouble with a module, then you should search
the Frequently Asked Questions to see if there are any about modules:

perldoc -q module

perlfaq8 mentions multiple ways of updating the @INC array.

If you plan to run perl, then you should read

perldoc perlrun

(take particular note of PERL5LIB)

--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.noitatibaher\100cmdat/"

sisyphus

unread,
Sep 3, 2009, 10:04:36 PM9/3/09
to
On Sep 4, 6:48 am, Pradeep <bubunia2000s...@gmail.com> wrote:
> On Sep 3, 5:19 pm, sisyphus <sisyphus...@gmail.com> wrote:

> could you please clarify
> what do u mean by prepend?

When you "append" you add something at the end.
When you "prepend" you add something at the beginning.

I mean you should add c:\perl\bin and c:\perl\site\bin to the
*beginning* of the path, not the end - eg:

set PATH=c:\perl\bin;c:\perl\site\bin;%PATH%

Cheers,
Rob

Pradeep

unread,
Sep 4, 2009, 8:17:09 AM9/4/09
to

I tried hard to fix this issue.. But failed to resolve.I also followed
what Tad McClellan mentioned above. But could not get a clue.

0 new messages