in reply to Re: Installing external libraries for perlbrew perl
in thread Installing external libraries for perlbrew perl

Hi Rob. perl -V:libpth gives me:
libpth='/opt/local/lib /usr/lib';
I have the gd library installed there but when I try to install GD.pm using cpan I get the error
**UNRECOVERABLE ERROR** Could not find gdlib-config in the search path.
Now I can see that gdlib-config is in /opt/local/bin. Is there any way to tell cpan that? Thanks

Replies are listed 'Best First'.
Re^3: Installing external libraries for perlbrew perl
by taint (Chaplain) on Dec 19, 2013 at 04:30 UTC
    Greetings, bangor.

    What shell area you using? Like sh, bash, csh, tcsh, zsh, etc. Chances are you should be able to simply open your terminal app, and do

    $PATH
    This will likely emit a long string. Which will contain all the directories within your search %PATH. Are any of the directories that you indicate your failed install(s) are complaining about, in the string of directories $PATH told you about?

    You do know that perlbrew messes with your {ENV}vironment, don't you? You should already have a "system" Perl installed -- that which the OS installed, as part of it's base. Your ENV determines which Perl is used, whenever you type "perl" in your terminal.

    At this point, I can't help but think your ENV is hosed. Not that it can't be corrected. But you will need to know which Perl you're running under. Because it makes all the difference, when using Perl, and when, and where to install Modules, and their dependencies.

    HTH

    --Chris

    Yes. What say about me, is true.
    
      $PATH gives me
      -bash: /Users/user/perl5/perlbrew/bin:/Users/user/perl5/perlbrew/perls +/perl-5.14.1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X1 +1/bin: No such file or directory
      I think I'm getting somewhere now. I added the following line to my bash profile
      export PATH=/opt/local/bin:/opt/local/sbin:$PATH
      That also changes my perl version to the one in /opt/local/bin but I can invoke cpan with
      sudo /Users/user/perl5/perlbrew/perls/perl-5.14.1/bin/perl5.14.1 -MCPA +N -e shell
      Now when I try to install GD it nearly succeeds, failing 1 test out of 13 which seems to be something to do with the JPEG library. I'll have to figure that out tomorrow as I'm exhausted now. Thanks for the help.

        Well, it's a start. But there's more you should consider/discover before going on a Module install(ing) frenzy. :) One thing that appears to me, out of place

        -bash: /Users/user/perl5/perlbrew/bin:/Users/user/perl5/perlbrew/perls +/perl-5.14.1/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X1 +1/bin: No such file or directory ^^^^^^^^^^^^^^^^^^^^^^^^^
        The "No such file or directory" shouldn't be there. I think a little more investigation of your ENVironment is probably in order. Just so you know exactly where you stand, at any given moment.

        Well. Take care.

        --Chris

        Yes. What say about me, is true.
        
Re^3: Installing external libraries for perlbrew perl
by Anonymous Monk on Dec 19, 2013 at 04:08 UTC
    is /opt/local/bin in $PATH?
      Sorry for my ignorance but how can I find that out?
        Sorry for my ignorance but how can I find that out?

        Run: echo $PATH
        The output needs to include the location of gdlib-config - which, I'm assuming, is /opt/local/bin.

        If the location of the gdlib-config file is not specified in $PATH, then you need to add that location to $PATH:
        export PATH=/opt/local/bin:$PATH
        Cheers,
        Rob