> -----Original Message-----
> From: KEVIN ZEMBOWER [mailto:[EMAIL PROTECTED]]
> Sent: Monday, November 26, 2001 11:36 AM
> To: [EMAIL PROTECTED]
> Subject: Trouble installing modules with CPAN, or changing @INC
> 
> 
> I have a program that requires Mail::Mailer.pm. When I try to 
> run it, I
> get:
> www:/usr/local/httpd/cgi-bin # ./mail2friend.pl 
> Can't locate Mail/Mailer.pm in @INC (@INC contains:
> /usr/lib/perl5/5.6.0/i586-linux /usr/lib/perl5/5.6.0
> /usr/lib/perl5/site_perl/5.6.0/i586-linux 
> /usr/lib/perl5/site_perl/5.6.0
> /usr/lib/perl5/site_perl .) at ./mail2friend.pl line 45.
> BEGIN failed--compilation aborted at ./mail2friend.pl line 45.
> 
> However:
> www:/usr/local/httpd/cgi-bin # find / -name Mailer.pm
> /root/.cpan/build/MailTools-1.41/Mail/Mailer.pm
> /root/.cpan/build/MailTools-1.41/blib/lib/Mail/Mailer.pm
> /usr/local/lib/perl5/site_perl/5.6.1/Mail/Mailer.pm
> 
> So, it seems to me that what's happening is that CPAN installed
> Mail::Maker in a directory that's not being searched in the 
> @INC array.
> 
> When I try to install it using CPAN, I get:
> www:/usr/local/httpd/cgi-bin # perl -MCPAN -e "install Mail::Mailer"
> ....
> Mail::Mailer is up to date.
> 
> This also happens if I force install. Previously, I had 
> entered "o conf
> make_install_arg UNINST=1" so I believe that this should uninstall the
> module, then reinstall it. [Tangent: How do I check to make sure this
> variable is still correctly set?]
> 
> 
> My questions:
>   How do I control which directory CPAN installs a module in? Is it a
> good idea to force this?
> Or:
>    How do I change the directories in @INC? Is it a good idea to force
> this?
> 
> Thanks in advance for your help.

Sounds like you have Perl installed twice on your system, and that
the one you're running your script under is not the same as the one
you're installing modules with.

Also, /usr/bin/perl is usually a link to your Perl binary, so make
sure that's pointing to the right one.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to