macosperlperlbrew

macOS Big Sur: Unexpected product version 11.1. How to patch perlbrew?


I just updated my Macbook Air from 10.15 to 11.1, and then tried to install perl 5.32 with perlbrew:

$ perlbrew install perl-5.32.0
Installing /Users/hakonhaegland/perl5/perlbrew/build/perl-5.32.0/perl-5.32.0 into ~/perl5/perlbrew/perls/perl-5.32.0

This could take a while. You can run the following command on another shell to track the status:

  tail -f ~/perl5/perlbrew/build.perl-5.32.0.log

Installation process failed. To spot any issues, check

  /Users/hakonhaegland/perl5/perlbrew/build.perl-5.32.0.log

and the build log shows:

[...]
Which of these apply, if any? [darwin]

*** Unexpected product version 11.1.
***
*** Try running sw_vers and see what its ProductVersion says.

##### Brew Failed #####

Fortunately, this issue has been fixed in the Perl development branch, see Add 11.x support for darwin.sh. So how can this fix now be backported to Perl 5.32.0 and applied with perlbrew?

Can patchperl be used here?


Solution

  • Seems like I just had to run:

    $ perlbrew install-patchperl
    
    /Users/hakonhaegland/perl5/perlbrew/bin/patchperl already exists, are you sure to override ? [y/N] [N] y
    
    patchperl is installed to
    
        /Users/hakonhaegland/perl5/perlbrew/bin/patchperl
    

    and then rerun

    $ perlbrew install perl-5.32.0