in reply to Trouble getting perlbrew working on Solaris machine

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

Replies are listed 'Best First'.
Re^2: Trouble getting perlbrew working on Solaris machine
by mje (Curate) on Sep 19, 2012 at 07:36 UTC

    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.