Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > CPAN.pm has /root as default home

Reply
Thread Tools

CPAN.pm has /root as default home

 
 
amirkarger@gmail.com
Guest
Posts: n/a
 
      08-10-2005
Hi.

Our sysadmin installs a bunch of Perl stuff using CPAN.pm. I decided to
try and use CPAN.pm today, but I got this:

Your configuration suggests "/root/.cpan" as your
CPAN.pm working directory. I could not create this directory due
to this error: mkdir /root/.cpan: Permission denied at
/usr/local/lib/perl5/5.8.6/CPAN.pm line 553

In retrospect, that's not so surprising. CPAN::Config.pm says:

'cpan_home' => q[/root/.cpan],

Obviously I'm not allowed to write to there, but CPAN::Config.pm is
where CPAN.pm assumes it should put stuff unless you tell it otherwise
in ~/.cpan/CPAN/MyConfig.pm.

So here's my question: is it generally better to create a MyConfig.pm
before using CPAN.pm, or can we write
'cpan_home' => "$ENV{HOME}/.cpan"
(and do the same to build_dir etc.)?

The former solution requires every user who wants to use CPAN.pm to
create a .cpan before running cpan. More likely, they'll just decide
CPAN's not working. So I prefer the latter. Is there anything wrong
with using ENV{HOME}? How do other people handle this situation?

-Amir Karger

 
Reply With Quote
 
 
 
 
xhoster@gmail.com
Guest
Posts: n/a
 
      08-10-2005
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Hi.
>
> Our sysadmin installs a bunch of Perl stuff using CPAN.pm. I decided to
> try and use CPAN.pm today, but I got this:
>
> Your configuration suggests "/root/.cpan" as your
> CPAN.pm working directory. I could not create this directory due
> to this error: mkdir /root/.cpan: Permission denied at
> /usr/local/lib/perl5/5.8.6/CPAN.pm line 553
>
> In retrospect, that's not so surprising. CPAN::Config.pm says:
>
> 'cpan_home' => q[/root/.cpan],
>
> Obviously I'm not allowed to write to there, but CPAN::Config.pm is
> where CPAN.pm assumes it should put stuff unless you tell it otherwise
> in ~/.cpan/CPAN/MyConfig.pm.


Last time I brought this up, I suggested that CPAN should, rather than just
complaining that you can't write into root's home directory, offer to
create and configure a new .cpan in your own home directory. Someone
replied that it does do this already, so I just dismissed it as my own
system's idiosyncricity.


> So here's my question: is it generally better to create a MyConfig.pm
> before using CPAN.pm, or can we write
> 'cpan_home' => "$ENV{HOME}/.cpan"
> (and do the same to build_dir etc.)?
>
> The former solution requires every user who wants to use CPAN.pm to
> create a .cpan before running cpan. More likely, they'll just decide
> CPAN's not working. So I prefer the latter. Is there anything wrong
> with using ENV{HOME}?


It seems to have worked for me. I haven't exhaustively it, so I can't
say there is nothing wrong with it. One potential problem is that every
Tom, Dick, and Harry will be taking up disk space with their own
individual copies of hundreds of modules, whereas if they were forced to go
to the sysadmin there would be only one centralized copy of each module.


> How do other people handle this situation?


Until just now, I haven't handled it. Where I was root, I didn't need to
handle it as I just installed what I wanted as root, and where I was not
root I had no opportunity to handle it.

>
> -Amir Karger


Xho

--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why is Default.aspx not present in the Default Content page? Gaetan ASP .Net 3 02-14-2006 07:24 PM
default.mspx or default.do micky ASP .Net 1 12-17-2005 12:42 AM
Default Domain Policy vs Default Domain Controller Policy Tyler Cobb MCSE 6 10-19-2005 09:36 PM
Default Mozilla isn't default! Help! M. FERRANTE Firefox 1 07-27-2005 09:07 AM
automatic default route propagation into RIP: default metric Ben Low Cisco 2 12-28-2003 03:57 AM



Advertisments