develooper Front page | | Postings from October 2007

Re: Running CPAN as a regular user, installing as root

Christopher Laco
October 18, 2007 17:27
Re: Running CPAN as a regular user, installing as root
Message ID:
Matisse Enzer wrote:
> I was following the comments in
> and came across something that was new to me, and seemed worthy of
> repeating here - if only one other person learns this it'll be worth it:
> In comment brian d
> foy points out that these days there is a really easy way to run CPAN as
> a normal user, and install as root. Here's how to set your CPAn config
> to do this:
> From your shell prompt:
>   sudo cpan
> Then from the cpan shell:
>   o conf make_install_make_command 'sudo make'
>   o conf mbuild_install_build_command 'sudo ./Build'
>   o conf commit
>   quit
> From now on, run cpan as a regular user:
>   cpan Some::New::Module
> That will build as you, and install as root.

I juat tried this on OSX. ~./cpan is my user

cpan -i CPAN


> Running make install
> Warning: You do not have permissions to install into //System/Library/Perl/5.8.6/darwin-thread-multi-2level at /System/Library/Perl/5.8.6/ExtUtils/ line 114.
> Cannot forceunlink /System/Library/Perl/5.8.6/ Permission denied at /System/Library/Perl/5.8.6/File/ line 906

o conf:

>     make               /usr/bin/make
>     make_arg           
>     make_install_arg   
>     make_install_make_command sudo make
>     makepl_arg         
>     mbuild_install_build_command sudo ./Build

-=Chris Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About