Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Trouble getting perlbrew working on Solaris machine

by mje (Curate)
on Sep 18, 2012 at 16:51 UTC ( [id://994312]=perlquestion: print w/replies, xml ) Need Help??

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

I've spent quite a bit of time trying to get perlbrew working on Solaris and now I'm stuck. The basic position I'm in now is:

$ perlbrew list * perl-5.16.1 $ perlbrew switch perl-5.16.1 $ which perl /export/home/sources/perl5/perlbrew/perls/perl-5.16.1/bin/perl $ echo $PERLBREW_ROOT /export/home/sources/perl5/perlbrew # NOTE the relative paths below # These differ from a linux box using perlbrew where # the paths are absolute. $ perl -MCPAN -le 'print' Can't locate CPAN.pm in @INC (@INC contains: ../lib/site_perl/5.16.1/s +un4-solaris ../lib/site_perl/5.16.1 ../lib/5.16.1/sun4-solaris ../lib +/5.16.1 .). BEGIN failed--compilation aborted. $ cd ~/perl5 $ find . -name CPAN.pm ./perlbrew/perls/perl-5.16.1/lib/5.16.1/CPAN.pm ./perlbrew/build/perl-5.16.1/cpan/CPAN/lib/CPAN.pm ./perlbrew/build/perl-5.16.1/lib/CPAN.pm

Some background.

I have sourced ~/perl5/perlbrew/etc/bashrc and I am running bash shell.

I just ran perlbrew install perl-5.16.1 to install 5.16.1 and it completed ok.

The box is used for other things so I did not want to change anything outside this account. As perlbrew uses HTTPS I needed a openssl installed for wget or curl. wget was a pain as the C source contains variable declarations in functions after code and after I'd fixed a number of these I got fed up and tried curl. Once I had a working curl perlbrew seems to need gtar which is gnu tar so I built that too. There were other issues with 3 argument open in perlbrew as the system Perl was 5.005_03 and perlbrew does a self-upgrade at the start.

Replies are listed 'Best First'.
Re: Trouble getting perlbrew working on Solaris machine
by rurban (Scribe) on Sep 18, 2012 at 19:49 UTC
    Have you tried the better alternative perlall? Runs fine on my solaris box. With gcc and sun cc.

      No, I'll look that up. Thanks.

Re: Trouble getting perlbrew working on Solaris machine
by kcott (Archbishop) on Sep 19, 2012 at 07:07 UTC

    G'day mje,

    I'm using perlbrew and bash. I'm on a different OS (Mac OS X) and using Perl 5.14.2. Here's some thoughts on the problem you describe.

    I get much the same results as you up to and including echo $PERLBREW_ROOT.

    With find . ..., the relative paths are what I'd expect (and what I get) because the search starts at the relative directory . (dot - current directory). I don't have a Linux box to test on: find may be implemented differently; although, I suspect the command find / ... may have been used - searching from the absolute direcrtory / (slash - root directory).

    How did you source ~/perl5/perlbrew/etc/bashrc? At the end of my ~/.bash_profile, I have

    . ~/.bashrc

    My ~/.bashrc only contains:

    . ~/perl5/perlbrew/etc/bashrc

    Did you type which perl and perl -MCPAN -le 'print' in the same window (login session)? It's possible that bashrc was sourced in one but not the other.

    Does perl -V show the same @INC as you got from the perl -MCPAN ... command?

    I suspect it's unlikely but you could also check for aliases (i.e. alias perl=...) which you may have picked up by sourcing the systemwide bashrc (possibly called /etc/bashrc).

    -- Ken

      All that shell output was pasted from the same terminal session. I put the source command in the ~/bash_profile logged out then back in but just for luck I also sourced it manually. The find command was issued from ~/perl5 (as the output shows, the login dir of that user then perl5 where perlbrew installed itself). perl -V does not work:

      $ perl -V Can't locate Config.pm in @INC (@INC contains: ../lib/site_perl/5.16.1 +/sun4-solaris ../lib/site_perl/5.16.1 ../lib/5.16.1/sun4-solaris ../l +ib/5.16.1 .). BEGIN failed--compilation aborted. $ cd ~/perl5 $ find . -name Config.pm -print ./perlbrew/perls/perl-5.16.1/lib/5.16.1/sun4-solaris/Config.pm ./perlbrew/build/perl-5.16.1/lib/Config.pm ./perlbrew/Config.pm # I filtered out some other Config.pms

        Hmm, you're probably run into issues with userelocatableinc . It was enabled by default for perl version >= 5.15.5 and worked fine on Mac/Linux, but apparently it has issues on other platforms.

        For now you may try to re-install perl-5.16.1 again by doing

        PERLBREW_CONFIGURE_FLAGS="-de" perlbrew install perl-5.16.1

        (After a `perlbrew uninstall perl-5.16.1` -- that essentially rm -rf the directory.)

        However I believe if you put full path shebang in your programs it should be good to run. It's just the perlbrew switching function that does not work well.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://994312]
Front-paged by Arunbear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (7)
As of 2024-04-19 10:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found