|
Posted by Sherm Pendley on March 19, 2007, 5:14 pm
Please log in for more thread options
> I'm using a web-server on a virtualhost, and trying to install
> Net::SMTP. I have CPAN configured to install into ~/perl (per the
> appropriate changes in ~/.cpan/CPAN/MyConfig.pm).
>
> However, the install is failing with the following error:
>
> ...
> Running make install
> Cannot forceunlink /usr/lib/perl5/5.8.7/Net/Cmd.pm: Permission denied
> at /usr/lib/perl5/5.8.7/File/Find.pm line 913
> Unlinking /usr/lib/perl5/5.8.7/Net/Cmd.pm (shadowing?)
> make: *** [pure_perl_install] Error 13
> /usr/bin/make install UNINST=1 -I/home/sunlifed/perl -- NOT OK
>
> I do not have root access to this server, and they seem to have
> Net::Cmd installed.
That's exactly the problem! They have Net::Cmd installed, there's a newer
version available, so CPAN is trying to install the update. Because you've
asked it to do so with UNINST=1, it's also trying to delete the original.
This option is primarily useful when installing modules in the standard site
lib directory. Because the core modules directory appears earlier in @INC,
and updated versions of those modules are installed in sitelib, the original
versions need to be deleted so that they don't "shadow" the updates - i.e.
prevent them from being seen.
UNINST=1 is not so useful for you when you're installing locally, for two
reasons. First, it will normally need root access to delete the original.
That's what it's trying to do here, and the source of the error.
Second, your private library directory will usually be added to @INC with
"use lib", unshift(), or PERL5LIB, which will all prepend it to the beginning
of @INC where it won't be "shadowed" anyway.
> Can anyone suggest how I might be able to circumvent this problem, and
> get Net::SMTP installed?
Patient: It hurts when I do this.
Doctor: Then don't do it.
In the CPAN shell, check for the current value of make_install_arg:
o conf make_install_arg
Set a new value for it. (If there are other options whose value you want to
keep unchanged, include those here too - you're setting the entire string
for make_install_arg here, not just replacing the UNINST substring.)
o conf make_install_arg 'UNINST=0'
Commit your changes to MyConfig.pm:
o conf commit
sherm--
--
Web Hosting by West Virginians, for West Virginians: http://wv-www.net Cocoa programming in Perl: http://camelbones.sourceforge.net
|