Installing Net::SMTP as non-root

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

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/

However, the install is failing with the following error:

 Running make install
 Cannot forceunlink /usr/lib/perl5/5.8.7/Net/ Permission denied
at /usr/lib/perl5/5.8.7/File/ line 913
 Unlinking /usr/lib/perl5/5.8.7/Net/ (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.

Can anyone suggest how I might be able to circumvent this problem, and
get Net::SMTP installed?

Thanks in advance,


Re: Installing Net::SMTP as non-root

Quoted text here. Click to load it

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.

Quoted text here. Click to load it

    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
    o conf commit


Web Hosting by West Virginians, for West Virginians:
Cocoa programming in Perl:

Site Timeline