Cannot Install ExtUtils::MakeMaker in Strawberry Perl

471 views Asked by At

I am trying to install GD and Chart to Strawberry Perl in a Windows 10 Pro PC (using CPANM). Both GD and Chart requires a dependency called ExtUtils::MakeMaker. Unfortunately MakeMaker fails to be install and I cannot tell what the error is. I hope someone can understand the error message and tell me what goes wrong.

That is how I try to install Chart and the few error message that I get:

cpanm Chart

--> Working on Chart
Fetching http://www.cpan.org/authors/id/L/LI/LICHTKIND/Chart-v2.402.1.tar.gz ... OK
==> Found dependencies: ExtUtils::MakeMaker
--> Working on ExtUtils::MakeMaker
Fetching http://www.cpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.64.tar.gz ... OK
Configuring ExtUtils-MakeMaker-7.64 ... N/A
! Configure failed for ExtUtils-MakeMaker-7.64. See C:\Users\..user-name..\.cpanm\work\1655122864.2228\build.log for details.
Configuring Chart-v2.402.1 ... N/A
! Configure failed for Chart-v2.402.1. See C:\Users\..user-name..\.cpanm\work\1655122864.2228\build.log for details.

The build.log says this:

cpanm (App::cpanminus) 1.7046 on perl 5.012003 built for MSWin32-x86-multi-thread
Work directory is C:\Users\..user-name../.cpanm/work/1655122864.2228
You have make C:\Strawberry\c\bin\dmake.exe
You have LWP 6.02
Falling back to Archive::Tar 1.76
Searching Chart () on cpanmetadb ...
--> Working on Chart
Fetching http://www.cpan.org/authors/id/L/LI/LICHTKIND/Chart-v2.402.1.tar.gz
-> OK
Unpacking Chart-v2.402.1.tar.gz
Entering Chart-v2.402.1
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... No (6.56 < 6.58)
==> Found dependencies: ExtUtils::MakeMaker
Searching ExtUtils::MakeMaker (6.58) on cpanmetadb ...
--> Working on ExtUtils::MakeMaker
Fetching http://www.cpan.org/authors/id/B/BI/BINGOS/ExtUtils-MakeMaker-7.64.tar.gz
-> OK
Unpacking ExtUtils-MakeMaker-7.64.tar.gz
Entering ExtUtils-MakeMaker-7.64
Checking configure dependencies from META.json
Configuring ExtUtils-MakeMaker-7.64
Running Makefile.PL
-> N/A
-> FAIL Configure failed for ExtUtils-MakeMaker-7.64. See C:\Users\..user-name..\.cpanm\work\1655122864.2228\build.log for details.
Configuring Chart-v2.402.1
Running Makefile.PL
-> N/A
-> FAIL Configure failed for Chart-v2.402.1. See C:\Users\..user-name..\.cpanm\work\1655122864.2228\build.log for details.

Please let me know what goes wrong and how to fix this problem. If there is no solution to this problem, I would like to know if there is any workaround. Thanks.

UPDATE 1: I installed the latest version of Perl (5.32.1.1). Unfortunately I still cannot install the dependency MakeMaker for Chart library. The content in the build.log after trying to install Chart is:

cpanm (App::cpanminus) 1.7046 on perl 5.032001 built for MSWin32-x86-multi-thread-64int
Work directory is C:\Users\...user-name.../.cpanm/work/1655143835.7588
You have make C:\Strawberry\c\bin\gmake.exe
You have LWP 6.52
Falling back to Archive::Tar 2.38
Searching Chart () on cpanmetadb ...
--> Working on Chart
Fetching http://www.cpan.org/authors/id/L/LI/LICHTKIND/Chart-v2.402.1.tar.gz
-> OK
Unpacking Chart-v2.402.1.tar.gz
Entering Chart-v2.402.1
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.58)
Configuring Chart-v2.402.1
Running Makefile.PL
-> N/A
-> FAIL Configure failed for Chart-v2.402.1. See C:\Users\...user-name...\.cpanm\work\1655143835.7588\build.log for details.

UPDATE 2: I used the -v switch with CPANM to install Chart, and this somehow worked fine. I don't know why -v switch can make a difference. But I am glad that this works for installing Chart. Now Chart is successfully installed. Unfortunately when I try to install GD using the -v switch, I run into the same error.

The build.log of my latest attempt is the following:

cpanm (App::cpanminus) 1.7046 on perl 5.032001 built for MSWin32-x86-multi-thread-64int
Work directory is C:\Users\...user-name.../.cpanm/work/1655147078.2428
You have make C:\Strawberry\c\bin\gmake.exe
You have LWP 6.52
Falling back to Archive::Tar 2.38
Searching GD () on cpanmetadb ...
--> Working on GD
Fetching http://www.cpan.org/authors/id/R/RU/RURBAN/GD-2.76.tar.gz
-> OK
Unpacking GD-2.76.tar.gz
Entering GD-2.76
Checking configure dependencies from META.json
Checking if you have ExtUtils::PkgConfig 0 ... Yes (1.16)
Checking if you have ExtUtils::Constant 0.22 ... Yes (0.25)
Configuring GD-2.76
Running Makefile.PL
-> N/A
-> FAIL Configure failed for GD-2.76. See C:\Users\...user-name...\.cpanm\work\1655147078.2428\build.log for details.

Please note that the build.log mentioned in the last line above is the same build.log that I have posted right above. I don't know why it refers to itself. I mention this just in case someone wants to see the "real" build.log.

UPDATE 3: Finally with the help from Håkon Hægland, I figured out that the PATH of the computer was missing several paths (namely C:\Windows;C:\Windows\System32;C:\Windows\System32\Wbem). I added the missing paths to PATH, and the installation is successful. I have no idea why those important paths would go missing. But I am glad that the installation of GD and Chart are successful.

1

There are 1 answers

0
Jay C On

With the help from Håkon Hægland, I finally figured out that the PATH of the computer somehow was missing several important paths, namely C:\Windows, C:\Windows\System32, and C:\Windows\System32\Wbem. This explains the reason why CPANM failed to install GD and Chart. It probably could not get access to a command to install the distribution or its dependency. After I have added the missing paths to PATH, I have no problem using CPANM to install GD and Chart.

As of why those paths were missing from PATH, I have no idea. I don't recall this problem ever happened to me.

As of why I could use CPANM to install Chart using the -v switch despite the fact that the paths were missing, I have no idea either.