develooper Front page | perl.perl5.porters | Postings from October 2003

CPAN bootstrap trouble

Thread Next
From:
Ilya Zakharevich
Date:
October 22, 2003 00:39
Subject:
CPAN bootstrap trouble
Message ID:
20031022073849.GA21183@math.berkeley.edu
For long a time I was wondering how some people could get stuck with
CPAN.  However, today on one of the systems I got into a situation
which forces *me* to scratch my head.

==================================================================

powdermilk:/tmp/iz/foo->perl -MCPAN -we shell

Your configuration suggests that CPAN.pm should use a working
directory of
    /home/src/.cpan
Unfortunately we could not create the lock file
    /home/src/.cpan/.lock
due to permission problems.

Please make sure that the configuration variable
    $CPAN::Config->{cpan_home}
points to a directory where you can write a .lock file. You can set
this variable in either
    /local/sol/2.6/depot/perl5.005_03/lib/5.00503/CPAN/Config.pm
or
    /home/u1/vis/ilya/.cpan/CPAN/MyConfig.pm

Could not open >/home/src/.cpan/.lock: Permission denied

==================================================================

As you see, due to some problems (well, actually I expect that they
are problems in CPAN.pm), CPAN (essentially) reads config of the root
user.  Now how could I fix it (if I did not know backdoors ;-)?

[Of course, the MyConfig file mentioned above is not present.]

I cannot start an interactive session (as you can see it above).  I
can't correct this by making /home/u1/vis/ilya/.cpan/CPAN/MyConfig.pm
- its format is not documented (even if I know what the message above
is talking about).  I cannot even ask CPAN to start without a lock (at
least via reading the docs).

here are the problems of CPAN.pm this illustrates:

 a) if root uses it early enough, the configuration is contaminated;

 b) if lock can't be acquired, the user should be given a choice
    (e.g., start with a fresh configuration for a different directory?).

 c) If MyConfig.pm is not found, the message better explain how to get it
    (e.g., copy the systemwise one?).

Thanks,
Ilya

P.S.  This is CPAN v1.76.

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About