Perl Module This Distribution Requires a Working Compiler at Makefile.PL

»»»Perl Module This Distribution Requires a Working Compiler at Makefile.PL
When compiling and installing a Perl module from source via CPAN or CPANM (CPANMinus) on Linux such as RHEL, CentOS and Ubuntu, a compiling error may occur when running the Makefile.

The error message shown can vary, but generally it looks like one of the following:

Executing /usr/bin/perl Makefile.PL && make ..

This distribution requires a working compiler at Makefile.PL line 52.

Running Makefile.PL
Configuring Moose-2.1402 … cc: error trying to exec ‘cc1’: execvp: No such file or directory
This distribution requires a working compiler at Makefile.PL line 52.
Configure failed for Moose-2.102. See build.log for details.

Perl No Compiler

To resolve the error, install the gcc, the GNU Compiler Collection.

To install gcc compiler in Red Hat Enterprise Linux (RHEL), CentOS and related distributions, use the following command:

$ sudo yum install gcc

Alternatively, if you want to install all development tools, you can use the following command to install essential packages for developers:

$ sudo yum group install "Development Tools"

If you’re using Debian, Ubuntu and their variants, you can install all the essential development-related compilers together with their required prerequisite packages.

$ sudo apt-get install build-essential

By |2016-12-09T08:39:16+00:00December 9th, 2016|Categories: Linux|Tags: , , , , , , , , , , |0 Comments

About the Author:

LK is a technology writer for Tech Journey with background of system and network administrator. He has be documenting his experiences in digital and technology world for over 15 years.Connect with LK through Tech Journey on Facebook, Twitter or Google+.