devslashneil has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I am trying to install the DBI module using:
perl -MCPAN -eshell
However make fails because gcc and make are stored in other directories (/opt/sfw/bin and /usr/ccs/bin)

I was wondering
a) How i make CPAN run its configuration script used when you first install CPAN. b) How i change where it will look for gcc.

Root's home directory is set to "/" and /.cpan does not exist, i am running this on a SPARC/Solaris box which i have the root account for.

Thanks

Neil Archibald - /dev/IT -

Replies are listed 'Best First'.
•Re: CPAN config
by merlyn (Sage) on Jun 26, 2003 at 07:30 UTC
    Your Perl was built with specific tools and specific paths to those tools locked into the configuration. CPAN.pm is merely using those paths. If the build environment is no longer available, you're gonna have a lot more trouble than its worth. Probably best to build a new Perl from scratch in your current environment, and then proceeding from there.

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

Re: CPAN config
by The Mad Hatter (Priest) on Jun 26, 2003 at 07:40 UTC
    From within the CPAN shell, typing o conf will give you a list of the configuration options and in what file they are stored in. To set a value, use o conf <name> <value>.

    In any case, CPAN.pm should, as far as I know, look for gcc and the other tools in the path, so try adding /opt/sfw/bin and /usr/ccs/bin to root's $PATH environment variable.

      Yes, also
      o conf commit
      Will write it out (save settings) :)

      Neil Archibald - /dev/IT -
Re: CPAN config
by PodMaster (Abbot) on Jun 26, 2003 at 07:29 UTC
Re: CPAN config
by devslashneil (Friar) on Jun 26, 2003 at 07:36 UTC
    What you've both said is true.

    Just thought i'd leave a note to say that by deleting
    /usr/local/lib/perl5/5.6.1/CPAN/Config.pm
    CPAN reconfigured itself on start-up :)

    Neil Archibald - /dev/IT -
Re: CPAN config
by Mr. Muskrat (Canon) on Jun 26, 2003 at 12:43 UTC
    To run the CPAN modules configuration again, go to the CPAN shell and type:
    o conf init