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

Hello Monks,

I messed my Perl libraries today and I need some help.

When I am opening a new terminal I get the following errors:

ERROR: The installation "perl-5.20.1" is unknown. ERROR: The installation "perl-5.20.1" is unknown. ERROR: The installation "perl-5.20.1" is unknown. ERROR: The installation "perl-5.20.1" is unknown.

When I am running perl -v I get:

$ perl -v This is perl 5, version 24, subversion 0 (v5.24.0) built for x86_64-li +nux Copyright 1987-2016, Larry Wall Perl may be copied only under the terms of either the Artistic License + or the GNU General Public License, which may be found in the Perl 5 source ki +t. Complete documentation for Perl, including FAQ lists, should be found +on this system using "man perl" or "perldoc perl". If you have access to + the Internet, point your browser at http://www.perl.org/, the Perl Home Pa +ge.

I installed the latest version of Perl with PerlBrew.

I have been searching online and I can not found any information regarding this error.

I do not know if this is also relevant:

$ which perl /usr/local/bin/perl

If you require further information let me know.

Seeking for Perl wisdom...on the process of learning...not there...yet!

Replies are listed 'Best First'.
Re: ERROR: The installation "perl-5.20.1" is unknown.
by kcott (Archbishop) on Apr 13, 2017 at 04:59 UTC

    G'day thanos1983,

    I do not know if this is also relevant:

    $ which perl /usr/local/bin/perl

    That's probably very relevant. It looks like the system Perl. Here's what I get:

    $ perlbrew switch perl-5.24.0t $ which perl /Users/ken/perl5/perlbrew/perls/perl-5.24.0t/bin/perl

    In "Re^2: ERROR: The installation "perl-5.20.1" is unknown.", you posted:

    My list is:

    $ perlbrew list perl-5.20.3 current (5.24.1)

    Note that none of the versions listed are preceded by an asterisk. This means that perlbrew is disabled and the system Perl has been enabled. You potentially used either the off or switch-off commands, see perlbrew for full details.

    I can reproduce this:

    $ which perl /Users/ken/perl5/perlbrew/perls/perl-5.24.0t/bin/perl $ perlbrew off perlbrew is turned off. $ 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 $ which perl /usr/local/bin/perl

    Then, in "Re^2: ERROR: The installation "perl-5.20.1" is unknown.", you posted:

    perlbrew switch 5.20.3 ... $ perlbrew list * perl-5.20.3 current (5.24.1)

    Now you'll see that the selected Perl has an asterisk.

    Again, I can reproduce this:

    $ perlbrew switch perl-5.20.2t $ perlbrew list ... perl-5.20.0t * perl-5.20.2t perl-5.22.0t ... $ which perl /Users/ken/perl5/perlbrew/perls/perl-5.20.2t/bin/perl $ perl -v | head -2 | tail -1 This is perl 5, version 20, subversion 2 (v5.20.2) built for darwin-th +read-multi-2level

    The name perl-5.20.3 has no direct bearing on the actual Perl version! While it intuitively makes sense to associate that name with Perl version 5.20.3, you don't have to. You could've called it fred or perl-99.99.99. When I install a new version, I use the '--as' switch to set the name. Once installed, you can use the alias command to create a new name. The perlbrew doco has details of these. To be absolutely certain which Perl version you're using, I suggest using an absolute path, something like this:

    $ perlbrew switch Currently switched to perl-5.20.2t $ which perl /Users/ken/perl5/perlbrew/perls/perl-5.20.2t/bin/perl $ /Users/ken/perl5/perlbrew/perls/perl-5.20.2t/bin/perl -v | head -2 | + tail -1 This is perl 5, version 20, subversion 2 (v5.20.2) built for darwin-th +read-multi-2level

    As for "current (5.24.1)" in your list, I probably can't help much. With an older version of App::perlbrew, "perlbrew list" used to give me every Perl on my system; I think there were an additional three, and each maybe had a format similar to "current (5.24.1)". This was all some time ago: I wouldn't put money on me recalling this accurately. Now I only get the Perls installed by perlbrew. I'm currently using "App::perlbrew 0.73"; perhaps consider upgrading if you're using an earlier version.

    — Ken

      $ which perl /usr/local/bin/perl
      That's probably very relevant. It looks like the system Perl.

      No, it doesn't. System perl is usually in /usr/bin, /usr/local/bin is reserved for locally administrated stuff outside the distribution. See also https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard.

      But then again, as several scripts start with #!/usr/local/bin/perl, it is quite common to have a symlink /usr/local/bin/perl pointing to some perl, e.g. /usr/bin/perl.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re: ERROR: The installation "perl-5.20.1" is unknown.
by huck (Prior) on Apr 12, 2017 at 14:42 UTC

      It's an alias:

      marto@shemp ~ $ perlbrew use 5.16.0 A sub-shell is launched with 5.16.0 as the activated perl. Run 'exit' +to finish it. bash-4.2$ exit exit marto@shemp ~ $ perlbrew use perl-5.16.0 A sub-shell is launched with perl-5.16.0 as the activated perl. Run 'e +xit' to finish it.

      Note that use is temporary, perlbrew switch version is permanent.

Re: ERROR: The installation "perl-5.20.1" is unknown.
by marto (Cardinal) on Apr 12, 2017 at 14:43 UTC

    What relevant lines do you have in your .rc file? What does perlbrew list show?

      Hello again marto,

      I just switched to perl 5.20.3 with:

      perlbrew switch 5.20.3

      Now the error is not there anymore, but when I apply:

      $ perlbrew list * perl-5.20.3 current (5.24.1)

      Does this makes sense? I mean since I am using 5.20.3 how is it possible to have current (5.24.1)?

      Update: I am even more confused, perl -v gives me 5.24.1. I am suppose to use 5.20.3 I would expect this version to be returned.

      Seeking for Perl wisdom...on the process of learning...not there...yet!

      Hello marto,

      My list is:

      $ perlbrew list perl-5.20.3 current (5.24.1)
      Seeking for Perl wisdom...on the process of learning...not there...yet!