I'm not sure CPAN.pm will understand line 4, specifying
where your
MyConfig.pm file is. Try removing this line, and
simply put the MyConfig.pm file in your
$HOME/.cpan/CPAN/ directory.
A couple of other points to check:
- sometimes CPAN.pm expects directories like
INSTALLMAN3DIR=~/share/man/man3 to already
exist, so you may have to initially create them.
- you should verify that the paths to the
specified programs, such as /usr/bin/make,
are the correct ones. You may be able to just specify
these by name (without the full path) if your PATH
environment variable is appropriately set.
UPDATE
Another possibility you might check is that the user
that the cgi script is running under may have a different
HOME environment variable than you do. If that's the
case, it may be easier to set the CPAN.pm config options
directly in the script, as in the following:
use CPAN;
use strict;
use warnings;
$CPAN::Config = {
'build_cache' => q[10],
'build_dir' => q[/full/path/to/your/build/dir],
# etc
'makepl_arg' => q[PREFIX=/full/path/to/wherever
LIB=/full/path/to/lib/perl5
# etc
],
# etc
'wget' => q[],
};
$CPAN::Config_loaded = 1;
my $mod = 'GD';
my $obj = CPAN::Shell->expand('Module',$mod);
$obj->install;
and verify that the appropriate permissions are in place
to allow the script to install things in the specified
locations.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.