User CPAN installation broken

Here is a workaround for a common problem. You do not have root access to perl but want to install perl libraries. Normally the user can use CPAN with local libraries (PERL5LIB). Sometimes CPAN gets comfused and you get an error like this: Your configuration suggests "/root/.cpan" as your working directory. I could not create this directory due to this error: mkdir /root/.cpan: Permission denied at /data/eva/perl/lib/perl5/site_perl/5.8.0/ line 552 I google around and found this solution:

Execute the following procedure (it worked for me, though I am not sure if all steps are necessary): 1. Create a directory for the perl modules in your HOME $ mkdir ~/perl5lib 2. Create ~/.cpan and ~/.cpan/CPAN directories: $ mkdir ~/.cpan $ mkdir ~/.cpan/CPAN 3. Create a for the CPAN module with $CPAN::Config empty $ echo "\$CPAN::Config = {}"> ~/.cpan/CPAN/ 4. Execute again: $ perl -MCPAN -e shell This time (if all goes well) it will prompt you for the empty fields in $CPAN::Config.

Author: Khürt Williams

A human who works in information security and enjoys photography, Formula 1 and craft ale.