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.