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

Respected Monks,

On Solaris 8 the initial version of Perl was 5.8.6 and it has been upgraded with Active Perl 5.8.8 version. Now when we try to install any other perl module we are facing the following errors :

perl Makefile.PL Set up gcc environment - 3.3.2 Unable to find a perl 5 (by these names: perl perl perl5 perl5.8.8 min +iperl, in these dirs: /usr/sbin /usr/bin /opt/Omnibus707/bin /bin /op +t/Omnibus707/probes /opt/Omnibus707/install /bin /opt/netcool/ism/pla +tform/solaris2/lib /usr/ccs/bin /usr/bin/bash /opt/Omni706/bin/solari +s2 /opt/Omni706/platform/solaris2/merant-4.1/merant/lib /opt/Omnibus7 +07/platform/solaris2/lib /opt/Omnibus707/bin/solaris2 /opt/netcool/IS +M24/platform/solaris2/lib /usr/local/apache/apache-2.0.58/lib /usr/li +b/sparcv9 /usr/local/bin /usr/local/perl-5.8.7 /usr/local/mysql/bin / +usr/local/apache/apache-2.0.58/openssl/lib /usr/local/apache2/lib /us +r/local/ssl/lib /usr/local/bin /usr/local/mysql/bin/ /usr/local/mysql +/lib/mysql/ /usr/local/lib /usr/local/lib/perl5/site_perl/5.8.7/sun4- +solaris/auto/DBD/mysql/mysql.so /usr/ccs/bin /usr/lib/sparcv9 /usr/lo +cal/lib/perl5/site_perl/5.8.6/sun4-solaris/auto/DBD/mysql /opt/netcoo +l/TWC_OMNI71/omnibus/bin /opt/ActivePerl-5.8/lib/ /opt/ActivePerl-5.8 +/bin/ /opt/ActivePerl-5.8/bin) Writing Makefile for Net::Telnet

Also in order to refer to the upgraded version of Perl we have created a soft link at location /usr/bin/perl

bash-2.03# which perl /usr/bin/perl bash-2.03# ls -l /usr/bin/perl lrwxrwxrwx 1 root other 28 Jul 25 00:18 /usr/bin/perl -> /opt/Activ +ePerl-5.8/bin/perl

Also set the environmental variable PATH with the upgraded version ( /opt/ActivePerl-5.8/bin/ )

Please let me know if I am doing any thing wrong or guide me with a possible solution. Thanks

Sushil Kumar

Replies are listed 'Best First'.
Re: Problem installing Perl modules
by adamk (Chaplain) on Aug 02, 2007 at 12:13 UTC
    The perl you use to execute the Makefile.PL indicates the perl instance (where multiple may exist) you want to build the module for.

    This is why the Makefile.PL files are not executable.

    Try this and see what happens.

    /opt/ActivePerl-5.8/bin/perl Makefile.PL

    If it is still not working, that means that the ActivePerl installation does not have a toolchain where it expects it to be (I believe there's a $Config entry for this).

    It is relatively normal for ActivePerl to not come with a full toolchain. You are expected, as I understand it, to use the ActivePerl PPM binary packages, rather than building modules yourself...

    (I don't like it)
Re: Problem installing Perl modules
by syphilis (Archbishop) on Aug 02, 2007 at 11:39 UTC
    The makefile is being written - so perl is obviously being found. What happens when you run make ?

    I see also that gcc-3.2.2 has been found. Is that the compiler you wish to use ? If not, you might need to hide it from the system.

    Cheers,
    Rob
      Thanks for your prompt reply ...

      When we execute make command after that what I get is

      bash-2.03# make sh: /0: not found *** Error code 1 make: Fatal error: Command failed for target `blib/lib/Net/.exists' bash-2.03# find / -name sh /usr/lib/mail/sh /usr/bin/sh /usr/xpg4/bin/sh
      So i also searched for sh.
      Sushil Kumar
Re: Problem installing Perl modules
by almut (Canon) on Aug 02, 2007 at 12:40 UTC

    It could also be a permission problem, in some weird interaction with two versions of Perl being installed...

    Try enabling double-verbose mode:

    $ perl Makefile.PL verbose verbose

    It should then output a lot of stuff, among which you should find "Result: ...", indicating why the calling of perl failed...

    Also, what's the permission of the actual binary (i.e. not the link)?

    $ ls -l /opt/ActivePerl-5.8/bin/perl

    or

    $ ls -lL /usr/bin/perl
      Yaah on executing the above command using double verbose I am getting lot of stuff being printed.

      . . . Checking /opt/ActivePerl-5.8/bin/perl Executing /opt/ActivePerl-5.8/bin/perl Result: '' . . Checking /opt/ActivePerl-5.8/bin/perl Executing /opt/ActivePerl-5.8/bin/perl Result: '' Checking /usr/sbin/perl Checking /usr/bin/perl Executing /usr/bin/perl Result: '' . . .
      permission of the actual binary are

      ls -l /opt/ActivePerl-5.8/bin/perl lrwxrwxrwx 1 root other 11 Jul 25 00:18 /opt/ActivePerl-5.8/bin +/perl -> perl-static
      Sushil Kumar

        So, let us play that same game once again.

        What do the following commands output?

        /usr/bin/perl -v /opt/ActivePerl-5.8/bin/perl -v /opt/ActivePerl-5.8/bin/perl-static -v

        Also, what groups do these programs all belong to?

        ls -l /usr/bin/perl /opt/ActivePerl-5.8/bin/perl /opt/ActivePerl-5.8/b +in/perl-static

        From the output you get, it seems neither /usr/bin/perl nor /opt/ActivePerl-5.8/bin/perl nor /opt/ActivePerl-5.8/bin/perl-static are executable for the user you're running things as. Talk to your sysadmin to fix these things.

        ls -l /opt/ActivePerl-5.8/bin/perl lrwxrwxrwx 1 root other 11 Jul 25 00:18 /opt/ActivePerl-5.8/bin +/perl -> perl-static

        That's still a symlink...  It's probably easier to use option -L, which dereferences across any levels of links...

        Also, what happens, if you try calling /opt/ActivePerl-5.8/bin/perl -v and /opt/ActivePerl-5.8/bin/perl -e'require 5.008.8' manually? Apparently, that's failing from within ExtUtils::MakeMaker (or more precisely, ExtUtils::MM_Unix)...

Re: Problem installing Perl modules
by syphilis (Archbishop) on Aug 02, 2007 at 13:41 UTC
    It's a long time since I've seen the 'Unable to find a perl 5' warning, and I've just been googling to refresh my memory. When I did last see it (on Win32), it turned out to be something that needed to be fixed. One fix was to edit the Makefile.PL to inlude 'PERL' => "$^X", in the 'WriteMakefile()' section.

    I don't know if that's a relevant thing to do in this instance, but it's something you could try. If it does prove effective, I'm sure someone will be able to come up with a better hack. You certainly don't want to have to edit the Makefile.PL every time you build a module :-)

    Cheers,
    Rob
Re: Problem installing Perl modules
by archfool (Monk) on Aug 02, 2007 at 11:29 UTC
    --Deleted - I didn't read the question properly! Sorry!--Feed me to the NodeReaper--