in reply to Using Perlbrew macOS impossible to install distributions

"Using Perlbrew macOS impossible to install distributions"

That's an erroneous generalisation. I've been installing Perl distributions on macOS (previously Mac OS X) since either v10.5.x or v10.6.x; the latest was on v10.12.5. I think "High Sierra" is v10.13.x: I don't have this upgrade yet, but I haven't encountered any reports of specific Perlbrew problems with this macOS version. I currently have all of these distributions installed:

$ perlbrew list perl-5.14.0t perl-5.14.2 perl-5.14.2t perl-5.18.0t perl-5.18.1t perl-5.20.0t perl-5.20.2t perl-5.22.0t perl-5.24.0t perl-5.25.9t * perl-5.26.0t

So, that includes the 5.22.0 you say you're having problems with; maybe there are others in that list which you've tried as well (you didn't specify what others you'd tried).

"To start using Perlbrew, I open the Terminal and write source ~/perl5/perlbrew/etc/bashrc"

I've never needed to do this; although, to be perfectly honest, I'm not entirely sure what you mean by this (I can make an educated guess, but it's still only a guess). If you put command line commands and output within <code>...</code> tags, as I did with "perlbrew list" above, it'll make what you're actually doing a lot clearer.

Almost at the end of my "~/.bash_profile", I have:

. $HOME/.bashrc

My "~/.bashrc" starts with:

. ~/perl5/perlbrew/etc/bashrc

Perhaps you need something similar to this.

You can also take a look at this post of mine from last month: the underlying issue is unrelated to your problem but it does show how I normally perform installations. When I use this method, "everything works for me out-of-the-box".

— Ken

Replies are listed 'Best First'.
Re^2: Using Perlbrew macOS impossible to install distributions
by karlgoethebier (Abbot) on Nov 27, 2017 at 11:46 UTC

    Mmh, if the Op's ENV looks like this...

    karls-mac-mini:~ karl$ env | grep PERLBREW PERLBREW_VERSION=0.58 PERLBREW_PERL=perl-5.18.0 PERLBREW_BASHRC_VERSION=0.58 PERLBREW_ROOT=/Users/karl/perl5/perlbrew PERLBREW_HOME=/Users/karl/.perlbrew PERLBREW_MANPATH=/Users/karl/perl5/perlbrew/perls/perl-5.18.0/man PERLBREW_PATH=/Users/karl/perl5/perlbrew/bin:/Users/karl/perl5/perlbre +w/perls/

    ...everything should be OK with perlbrew, right? Very strange...

    Best regards, Karl

    «The Crux of the Biscuit is the Apostrophe»

    perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help

      G'day Karl,

      I read what you've written several times but the point you're trying to make eludes me. I was particularly stumped by your final words: "Very strange...".

      The OP shouldn't need to manually source '~/perl5/perlbrew/etc/bashrc' in order to use Perlbrew. Doing this will set up environment variables such as you've shown, but only in the current shell. It's a tedious task that's easy to forget and therefore error-prone: hence my suggestion to set up something similar to my '.bash_profile' and '.bashrc'.

      I set all this up for myself years ago and haven't needed to change anything since. While I don't remember specifics, I do recall all instructions came from Perlbrew documentation: I didn't need to seek out secret incantations in dark corners of the Internet.

      For what it's worth, except for some obvious and expected differences (e.g. s/karl/ken/), my environment looks very similar to yours.

      — Ken

        "I set all this up for myself years ago and haven't needed to change anything since"

        Like me. It was a "Fire And Forget" task.

        My .bashrc is empty.

        My .bash_profile:

        karls-mac-mini:~ karl$ cat .bash_profile source ~/perl5/perlbrew/etc/bashrc export JAVA_HOME=$(/usr/libexec/java_home)

        My perlbrew bashrc:

        I did nothing related to perlbrew "by hand".

        Best regards, Karl

        «The Crux of the Biscuit is the Apostrophe»

        perl -MCrypt::CBC -E 'say Crypt::CBC->new(-key=>'kgb',-cipher=>"Blowfish")->decrypt_hex($ENV{KARL});'Help