You're absolutely right. The script began with "!#/usr/bin/perl" When I
changed it to "/usr/local/bin/perl" the error went away. Furthermore:
www:/usr/local/httpd/cgi-bin # ll /usr/bin/perl
-rwxr-xr-x    2 root     root       775822 May 11  2001 /usr/bin/perl
www:/usr/local/httpd/cgi-bin # ll /usr/local/bin/perl
-rwxr-xr-x    2 root     root       804397 Nov  6 11:15
/usr/local/bin/perl
www:/usr/local/httpd/cgi-bin # 

Any suggestions on cleaning up this mess? Can I just delete
/usr/bin/perl and link it to /usr/local/bin/perl, or is there a more
elaborate, better solution?

Also, are you saying in general that there should never be a need to
force the directory that CPAN installs into, or to change the contents
of @INC? If there's still a need to sometimes do either of these, I'd
still welcome anyone to suggest how to do them, as well as how to check
if the make_install_arg is still set.

Thank for your help, Bob.

-Kevin Zembower

>>> Bob Showalter <[EMAIL PROTECTED]> 11/26/01 11:45AM >>>
> -----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] 


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

Reply via email to