laziness, impatience, and hubris | |
PerlMonks |
Re: Image.pm not foundby chrstphrchvz (Scribe) |
on Jun 26, 2019 at 05:56 UTC ( [id://11101906]=note: print w/replies, xml ) | Need Help?? |
"not found: No such file or directory at /opt/local/lib/perl5/site_perl/5.26/darwin-thread-multi-2level/GD/Image.pm line 64." I'm guessing you're using MacPorts (which is how I usually use Perl on macOS); /opt/local is the default MacPorts prefix, and …/perl5/site_perl is where cpan/cpanm (from MacPorts) would try installing modules. Have you tried installing GD from MacPorts (i.e. not through cpan/cpanm)? sudo port install p5.26-gd Edit: You first mention Perl 5.28 (on the newer MacBook), but this error has 5.26; so maybe what you're after is installing p5.28-gd instead. Some things to be mindful of with MacPorts are that it offers multiple versions of Perl, which can be installed simultaneously. (5.26 and 5.28 are the ones currently with installable modules.) Since each Perl version installed by MacPorts is independent, so are any modules that are installed for each version. Although MacPorts' Perl can be invoked using a perl command if the perl5 port is installed, it may be safer to specify which version of Perl to use using a versioned command, e.g. perl5.28. Some utilities currently don't have unversioned commands, e.g. cpanm must be specified as cpanm-5.28. Edit 2: Rather than jumping straight into MacPorts details, I should probably instead advocate taking a step back to decide how you're going to use Perl on these Macs: whether to use a general-purpose package manager (Homebrew, MacPorts, Fink), a Perl-specific distribution (Perlbrew, ActivePerl, etc.), or going with macOS' included system Perl. I don't think it is a good choice to get comfortable with macOS' included Perl; it's virtually unsupported compared to the alternatives, and it will not be present in some future macOS version (the upcoming version of macOS, 10.15 "Catalina", claims to include Perl and other scripting languages only for compatibility), so you may eventually have to find an alternative anyways. Each choice for obtaining Perl has different audiences/purposes/goals/etc., and I have no idea which one the Perl community is most familiar with or willing to help others navigate. But I'm inclined to guess that either Homebrew or Perlbrew is the most popular choice.
In Section
Seekers of Perl Wisdom
|
|