In Webmin, when attempting to install Perl modules, some modules may fail to install from packages. In such cases, the system will automatically try to install from source. However, when trying to build and install modules, Webmin will return the following error message:

Failed to install module : One or more of the Perl modules needs Module::Build to be built, but this Perl module is not installed.

Perl Module::Build Not Installed

As described in the error message, the system is unable to compile and build Perl modules as Module::Build module is not installed. The error commonly happens in system which is not installed as a development machine. To resolve the error, just install the Module::Build module.

The tutorial will install the Module::Build Perl module and its necessary dependencies via Webmin.

  1. Log in to the Webmin control panel, i.e. https://your.server.com:10000/.
  2. Login as root, or a webmin user with full access.
  3. If you’re using Virtualmin or Cloudmin, click on Webmin on the top of sidebar.

    Switch to Webmin Menu

  4. Expand the Others tree.
  5. Click on Perl Modules.

    Perl Modules in Webmin

  6. Enter Module::Build in the text box after From CPAN, named, and ensure that its check box is selected.

    Install Perl Modules

  7. Click on Install button to install the module.
  8. Click on Return to modules list when done.

Module::Build

The package management automatically installed the following packages:

perl-Module-Build
perl-ExtUtils-CBuilder
perl-IPC-Cmd
perl-Locale-Maketext
perl-Locale-Maketext-Simple
perl-Module-CoreList
perl-Module-Load
perl-Module-Load-Conditional
perl-Params-Check
perl-Perl-OSType

Tip
In Red Hat Enterprise Linux (RHEL), Fedora, CentOS and other Linux distributions, you can use the following package management command to install Module::Build and its dependencies too:

$ su yum install perl-Module-Build