Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Remotely install modules

by randyk (Parson)
on Jan 01, 2006 at 19:47 UTC ( [id://520279]=note: print w/replies, xml ) Need Help??


in reply to Remotely install modules

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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://520279]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (6)
As of 2024-04-23 08:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found