'Error when trying to install cpan install Win32::PerfLib
I need to run one Perl script (I have not developped that script). When I tried to run perl.exe the_perl_script.pl, it throws an error about 'Win32::PerfLib'. Hence, I tried to install 'Win32::PerfLib' by using the following command
cpan install Win32::PerfLib
but I got an error, although I installed gcc.
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.219)
Database was generated on Fri, 18 Mar 2022 08:39:48 GMT
Running install for module 'Win32::PerfLib'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.1)
Checksum for C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\cpan\sources\authors\id\J\JD\JDB\Win32-PerfLib-0.07.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.38)
CPAN: YAML::XS loaded ok (v0.82)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
Configuring J/JD/JDB/Win32-PerfLib-0.07.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Win32::PerfLib
Writing MYMETA.yml and MYMETA.json
JDB/Win32-PerfLib-0.07.tar.gz
C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe Makefile.PL -- OK
Running make for J/JD/JDB/Win32-PerfLib-0.07.tar.gz
CPAN: Module::CoreList loaded ok (v5.20210123)
cp PerfLib.pm blib\lib\Win32\PerfLib.pm
AutoSplitting blib\lib\Win32\PerfLib.pm (blib\lib\auto\Win32\PerfLib)
Running Mkbootstrap for PerfLib ()
"C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "PerfLib.bs"
"C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- PerfLib.bs blib\arch\auto\Win32\PerfLib\PerfLib.bs 644
"C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe" "C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\lib\ExtUtils/xsubpp" -typemap C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\lib\ExtUtils\typemap -typemap C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\cpan\build\Win32-PerfLib-0.07-8\typemap PerfLib.xs > PerfLib.xsc
"C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe" -MExtUtils::Command -e mv -- PerfLib.xsc PerfLib.c
gcc -c -DWIN32 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"0.07\" -DXS_VERSION=\"0.07\" "-IC:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\lib\CORE" PerfLib.c
gcc: error: CreateProcess: No such file or directory
gmake: *** [Makefile:330: PerfLib.o] Error 1
JDB/Win32-PerfLib-0.07.tar.gz
C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\c\bin\gmake.exe -- NOT OK
Stopping: 'install' failed for 'Win32::PerfLib'.
C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin>cpan install Win32::PerfLib
Loading internal logger. Log::Log4perl recommended for better logging
CPAN: CPAN::SQLite loaded ok (v0.219)
Database was generated on Fri, 18 Mar 2022 08:39:48 GMT
Running install for module 'Win32::PerfLib'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.1)
Checksum for C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\cpan\sources\authors\id\J\JD\JDB\Win32-PerfLib-0.07.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.38)
CPAN: YAML::XS loaded ok (v0.82)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
Configuring J/JD/JDB/Win32-PerfLib-0.07.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for Win32::PerfLib
Writing MYMETA.yml and MYMETA.json
JDB/Win32-PerfLib-0.07.tar.gz
C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe Makefile.PL -- OK
Running make for J/JD/JDB/Win32-PerfLib-0.07.tar.gz
CPAN: Module::CoreList loaded ok (v5.20210123)
cp PerfLib.pm blib\lib\Win32\PerfLib.pm
AutoSplitting blib\lib\Win32\PerfLib.pm (blib\lib\auto\Win32\PerfLib)
Running Mkbootstrap for PerfLib ()
"C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "PerfLib.bs"
"C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- PerfLib.bs blib\arch\auto\Win32\PerfLib\PerfLib.bs 644
"C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe" "C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\lib\ExtUtils/xsubpp" -typemap C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\lib\ExtUtils\typemap -typemap C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\cpan\build\Win32-PerfLib-0.07-9\typemap PerfLib.xs > PerfLib.xsc
"C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\bin\perl.exe" -MExtUtils::Command -e mv -- PerfLib.xsc PerfLib.c
gcc -c -DWIN32 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"0.07\" -DXS_VERSION=\"0.07\" "-IC:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\perl\lib\CORE" PerfLib.c
gcc: error: CreateProcess: No such file or directory
gmake: *** [Makefile:330: PerfLib.o] Error 1
JDB/Win32-PerfLib-0.07.tar.gz
C:\AMTServices\docgen2\ennov-amt-remote-client\ennov-docgen-service\script\myperl\c\bin\gmake.exe -- NOT OK
Stopping: 'install' failed for 'Win32::PerfLib'.
I just retarted my PC and reinstall again, have another error
gcc -c -DWIN32 -D__USE_MINGW_ANSI_STDIO -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION="0.07" -DXS_VERSION="0.07" "-IC:\STRAWB~1\perl\lib\CORE" PerfLib.c In file included from c:\mingw\include\windef.h:269, from c:\mingw\include\windows.h:42, from PerfLib.xs:2: c:\mingw\include\winnt.h:49:10: fatal error: string.h: No such file or directory 49 | #include <string.h> | ^~~~~~~~~~ compilation terminated. gmake: *** [Makefile:330: PerfLib.o] Error 1 FAIL ! Installing Win32::PerfLib failed. See C:\Users\nnguyen.cpanm\work\1647607011.15028\build.log for details. Retry with --force to force install it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|