Perl "Can't locate ExtUtils/MakeMaker.pm" in CI
Makefile.PL starts with use ExtUtils::MakeMaker; and the runner Perl does not have it on @INC. It normally ships in core, so this points to a stripped or custom interpreter.
What this error means
The configure step dies immediately with "Can't locate ExtUtils/MakeMaker.pm in @INC" at line 1 of Makefile.PL.
Can't locate ExtUtils/MakeMaker.pm in @INC (you may need to install the
ExtUtils::MakeMaker module) (@INC contains: /home/runner/perl5/lib/perl5 .)
at Makefile.PL line 1.Common causes
A minimal Perl missing core toolchain modules
A slim image or an isolated local::lib omits ExtUtils::MakeMaker, which most distributions need at configure time.
A very old or hand-built Perl
A custom-compiled Perl that skipped the toolchain leaves MakeMaker unavailable for building from source.
How to fix it
Install the MakeMaker toolchain
Install ExtUtils::MakeMaker (and Module::Build for Build.PL distributions) before configuring.
cpanm --notest ExtUtils::MakeMaker Module::BuildUse a full Perl via setup-perl
A standard Perl provisioned by the setup action ships the toolchain, so MakeMaker is present.
- uses: shogo82148/actions-setup-perl@v1
with:
perl-version: '5.38'How to prevent it
- Provision a standard Perl that includes the core toolchain.
- Install ExtUtils::MakeMaker and Module::Build into isolated local::libs.
- Avoid stripping toolchain modules from custom images.