Difference between revisions of "Upgrading Perl on MacOS Mojave"
(Created page with "MacOS Mojave, which is from 2018, comes with a version of Perl (5.18) from 2013. To update to a newer version of Perl, install Homebrew. Then run the command: brew install...") |
|||
Line 3: | Line 3: | ||
To update to a newer version of Perl, install Homebrew. Then run the command: | To update to a newer version of Perl, install Homebrew. Then run the command: | ||
− | brew install perl | + | <code>brew install perl</code> |
And when that's done run the command: | And when that's done run the command: | ||
− | brew install cpanm | + | <code>brew install cpanm</code> |
In that order. If you install cpanm first, it will latch onto Perl 5.18 and install modules to | In that order. If you install cpanm first, it will latch onto Perl 5.18 and install modules to | ||
− | /Library/Perl/5.18 | + | <code>/Library/Perl/5.18</code> |
instead of to | instead of to | ||
− | /usr/local/Cellar/perl/5.36.0/lib/perl5/site_perl/5.36/ | + | <code>/usr/local/Cellar/perl/5.36.0/lib/perl5/site_perl/5.36/</code> |
+ | |||
+ | And then Perl will be unable to locate the module. | ||
+ | |||
+ | <code>Can't locate ... in @INC </code> |
Latest revision as of 21:57, 26 October 2022
MacOS Mojave, which is from 2018, comes with a version of Perl (5.18) from 2013.
To update to a newer version of Perl, install Homebrew. Then run the command:
brew install perl
And when that's done run the command:
brew install cpanm
In that order. If you install cpanm first, it will latch onto Perl 5.18 and install modules to
/Library/Perl/5.18
instead of to
/usr/local/Cellar/perl/5.36.0/lib/perl5/site_perl/5.36/
And then Perl will be unable to locate the module.
Can't locate ... in @INC