Re: Installing Net::SMTP as non-root



"Brian B-dawg" <brianmhunt@xxxxxxxxx> writes:

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
.



Relevant Pages

  • force install Bundle::CPAN failing
    ... This is on an ubuntu machine an force install Bundle::CPAN is failing. ... CPAN: File::HomeDir loaded ok ... Checking if your kit is complete... ... CPAN: checksum security checks disabled because Digest::SHA not installed. ...
    (Ubuntu)
  • RE: How to reconfigure MCPAN ?
    ... > Parameters for the 'perl Makefile.PL' command? ... > And now, each I try to install a module by using CPAN shell, it fail: ... You can reconfigure CPAN completely by using 'o conf init' at the cpan ...
    (perl.beginners)
  • Re: Out of memory! - from CPAN
    ... As I am new here and had not received many replies, I was merely asking for a "better suggested place" to ask my odd error messages question. ... > 1) Download the Bundle::CPAN tarball from CPAN and install it manually ... The cpan until is being pahased out anyway, ... This works fine on modules with no to just a few dependencies. ...
    (perl.beginners)
  • Re: Installing Modules From CPAN
    ... cpan shell -- CPAN exploration and modules ... ReadLine support available (try 'install ... readline() on closed filehandle PIPE at Makefile.PL ...
    (perl.beginners)
  • RE: Installing DBD::File via CPAN
    ... Subject: Installing DBD::File via CPAN ... This is Perl 5.8.7 ... ReadLine support available (try 'install Bundle::CPAN') ...
    (perl.dbi.users)