无法安装 perl CPAN 模块 POSIX::strptime
Unable to install perl CPAN module POSIX::strptime
我正在尝试在 Windows 10 系统上安装 perl 模块 POSIX::strptime
,即 运行 Strawberry Perl 5.24.1.1(64 位),使用 cpan 命令但是它无法构建和安装。我使用的命令是:
cpan> install POSIX::strptime
输出为:
Running install for module 'POSIX::strptime'
Checksum for C:\STRAWB~1\cpan\sources\authors\id\G\GO\GOZER\POSIX-strptime-0.13.tar.gz ok
Configuring G/GO/GOZER/POSIX-strptime-0.13.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for POSIX::strptime
Writing MYMETA.yml and MYMETA.json
GOZER/POSIX-strptime-0.13.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for G/GO/GOZER/POSIX-strptime-0.13.tar.gz
cp lib/POSIX/strptime.pm blib\lib\POSIX\strptime.pm
Running Mkbootstrap for strptime ()
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "strptime.bs"
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- strptime.bs blib\arch\auto\POSIX\strptime\strptime.bs 644
"C:\Strawberry\perl\bin\perl.exe" "C:\Strawberry\perl\lib\ExtUtils\xsubpp" -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap strptime.xs > strptime.xsc
Please specify prototyping behavior for strptime.xs (see perlxs manual)
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv -- strptime.xsc strptime.c
gcc -c -I. -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"0.13\" -DXS_VERSION=\"0.13\" "-IC:\STRAWB~1\perl\lib\CORE" strptime.c
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"POSIX::strptime\", 'DLBASE' => 'strptime', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
g++ strptime.def -o blib\arch\auto\POSIX\strptime\strptime.xs.dll -mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" strptime.o "C:\STRAWB~1\perl\lib\CORE\libperl524.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -Wl,--enable-auto-image-base
strptime.o:strptime.c:(.text+0x121): undefined reference to `strptime'
collect2.exe: error: ld returned 1 exit status
dmake.exe: Error code 129, while making 'blib\arch\auto\POSIX\strptime\strptime.xs.dll'
GOZER/POSIX-strptime-0.13.tar.gz
C:\STRAWB~1\c\bin\dmake.exe -- NOT OK
Stopping: 'install' failed for 'POSIX::strptime'.
Failed during this command:
GOZER/POSIX-strptime-0.13.tar.gz : make NO
有人能帮我解决这个问题吗?
谢谢,
马特
在您的日志中,关键错误是:
strptime.o:strptime.c:(.text+0x121): undefined reference to 'strptime'
没有strptime
就Windows到link到。因此,该模块没有机会在 Windows 上构建。 Makefile.PL
应该对此进行测试并摆脱困境。
正如已经指出的那样,DateTime::Format::Strptime may be a suitable replacement. Time::Strptime and Time::Piece->strptime 是其他选择。
我正在尝试在 Windows 10 系统上安装 perl 模块 POSIX::strptime
,即 运行 Strawberry Perl 5.24.1.1(64 位),使用 cpan 命令但是它无法构建和安装。我使用的命令是:
cpan> install POSIX::strptime
输出为:
Running install for module 'POSIX::strptime'
Checksum for C:\STRAWB~1\cpan\sources\authors\id\G\GO\GOZER\POSIX-strptime-0.13.tar.gz ok
Configuring G/GO/GOZER/POSIX-strptime-0.13.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a dmake-style Makefile
Writing Makefile for POSIX::strptime
Writing MYMETA.yml and MYMETA.json
GOZER/POSIX-strptime-0.13.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for G/GO/GOZER/POSIX-strptime-0.13.tar.gz
cp lib/POSIX/strptime.pm blib\lib\POSIX\strptime.pm
Running Mkbootstrap for strptime ()
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "strptime.bs"
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- strptime.bs blib\arch\auto\POSIX\strptime\strptime.bs 644
"C:\Strawberry\perl\bin\perl.exe" "C:\Strawberry\perl\lib\ExtUtils\xsubpp" -typemap C:\STRAWB~1\perl\lib\ExtUtils\typemap strptime.xs > strptime.xsc
Please specify prototyping behavior for strptime.xs (see perlxs manual)
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Command -e mv -- strptime.xsc strptime.c
gcc -c -I. -s -O2 -DWIN32 -DWIN64 -DCONSERVATIVE -DPERL_TEXTMODE_SCRIPTS -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfields -s -O2 -DVERSION=\"0.13\" -DXS_VERSION=\"0.13\" "-IC:\STRAWB~1\perl\lib\CORE" strptime.c
"C:\Strawberry\perl\bin\perl.exe" -MExtUtils::Mksymlists \
-e "Mksymlists('NAME'=>\"POSIX::strptime\", 'DLBASE' => 'strptime', 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' => []);"
g++ strptime.def -o blib\arch\auto\POSIX\strptime\strptime.xs.dll -mdll -s -L"C:\STRAWB~1\perl\lib\CORE" -L"C:\STRAWB~1\c\lib" strptime.o "C:\STRAWB~1\perl\lib\CORE\libperl524.a" -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lcomctl32 -Wl,--enable-auto-image-base
strptime.o:strptime.c:(.text+0x121): undefined reference to `strptime'
collect2.exe: error: ld returned 1 exit status
dmake.exe: Error code 129, while making 'blib\arch\auto\POSIX\strptime\strptime.xs.dll'
GOZER/POSIX-strptime-0.13.tar.gz
C:\STRAWB~1\c\bin\dmake.exe -- NOT OK
Stopping: 'install' failed for 'POSIX::strptime'.
Failed during this command:
GOZER/POSIX-strptime-0.13.tar.gz : make NO
有人能帮我解决这个问题吗?
谢谢, 马特
在您的日志中,关键错误是:
strptime.o:strptime.c:(.text+0x121): undefined reference to 'strptime'
没有strptime
就Windows到link到。因此,该模块没有机会在 Windows 上构建。 Makefile.PL
应该对此进行测试并摆脱困境。
正如已经指出的那样,DateTime::Format::Strptime may be a suitable replacement. Time::Strptime and Time::Piece->strptime 是其他选择。