Skip to content
Latchkey

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.

perl
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.

Terminal
cpanm --notest ExtUtils::MakeMaker Module::Build

Use a full Perl via setup-perl

A standard Perl provisioned by the setup action ships the toolchain, so MakeMaker is present.

.github/workflows/ci.yml
- 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.

Frequently asked questions

What causes ""Can't locate ExtUtils/MakeMaker.pm""?
A slim image or an isolated local::lib omits ExtUtils::MakeMaker, which most distributions need at configure time.
How do I fix "Can't locate ExtUtils/MakeMaker.pm"?
Install ExtUtils::MakeMaker (and Module::Build for Build.PL distributions) before configuring.

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card