Perl Win32 SerialPort安装错误

Perl Win32 SerialPort安装错误,perl,Perl,当尝试在windows命令提示符下安装Win32 SerialPort时,使用activeperl 5.24.1 build(2402)64位出现以下错误,有人能告诉我它是否出错以及如何安装Win32::SerialPort吗?我已经安装了草莓和active perl cmd> perl -MCPAN -e shell cpan> install Win32::SerialPort Database was generated on Thu, 09 Mar 2017 12:01:

当尝试在windows命令提示符下安装Win32 SerialPort时,使用activeperl 5.24.1 build(2402)64位出现以下错误,有人能告诉我它是否出错以及如何安装Win32::SerialPort吗?我已经安装了草莓和active perl

cmd> perl -MCPAN -e shell

cpan>  install Win32::SerialPort
Database was generated on Thu, 09 Mar 2017 12:01:53 GMT

Running install for module 'Win32::SerialPort'
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz
Fetching with LWP:
http://cpan.strawberryperl.com/authors/id/B/BB/BBIRTH/CHECKSUMS
Checksum for C:\STRAWB~1\cpan\sources\authors\id\B\BB\BBIRTH\Win32-SerialPort-0.22.tar.gz ok
Scanning cache C:\STRAWB~1\cpan\build for sizes
............................................................................DONE
Configuring B/BB/BBIRTH/Win32-SerialPort-0.22.tar.gz with Makefile.PL
Can't spawn "cmd.exe": No such file or directory at Makefile.PL line 35.
Device COM1 does not appear to exist. Testing impossible
No 'Makefile' created  BBIRTH/Win32-SerialPort-0.22.tar.gz
  C:\Strawberry\perl\bin\perl.exe Makefile.PL -- NOT OK
Stopping: 'install' failed for 'Win32::SerialPort'.
Failed during this command:
 BBIRTH/Win32-SerialPort-0.22.tar.gz          : writemakefile NO -- No 'Makefile' created
编辑:

根据Jens的建议,我已将路径设置为
set path=%path%;C:\windows\system32

感谢您的建议“cmd.exe”错误消失,但 现在出现以下错误,有解决方案吗

Test Summary Report
-------------------
t/test1.t (Wstat: 256 Tests: 309 Failed: 1)
  Failed test:  157
  Non-zero exit status: 1
t/test2.t (Wstat: 256 Tests: 146 Failed: 1)
  Failed test:  27
  Non-zero exit status: 1
t/test3.t (Wstat: 256 Tests: 264 Failed: 1)
  Failed test:  149
  Non-zero exit status: 1
t/test4.t (Wstat: 256 Tests: 518 Failed: 1)
  Failed test:  366
  Non-zero exit status: 1
t/test7.t (Wstat: 512 Tests: 90 Failed: 2)
  Failed tests:  21-22
  Non-zero exit status: 2
Files=7, Tests=1808,  6 wallclock secs ( 0.27 usr +  0.05 sys =  0.31 CPU)
Result: FAIL
Failed 5/7 test programs. 6/1808 subtests failed.
dmake.exe:  Error code 130, while making 'test_dynamic'
  BBIRTH/Win32-SerialPort-0.22.tar.gz
  C:\STRAWB~1\c\bin\dmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports BBIRTH/Win32-SerialPort-0.22.tar.gz

另外,我同时使用Activeperl和Strawberry perl,这会有问题吗?

看起来您的path变量中缺少cmd的路径:
无法生成“cmd.exe”:Makefile.PL上没有这样的文件或目录
您能详细说明一下吗?尝试执行
设置路径=%path%;C:\windows\system32
在调用
perl-MCPAN-e shell之前,问题已得到解决,但
5/7测试程序失败。6/1808子测试失败。dmake.exe:错误代码130,在生成'test_dynamic'BBIRTH/Win32-SerialPort-0.22.tar.gz C:\STRAWB~1\C\bin\dmake.exe test--不正常
获取上述错误如果您仔细查看,您会发现在七个测试程序中,1327个测试中有六个失败。按照建议检查capantesters结果表明,自版本5.20.1以来,它尚未在相关平台(Windows)上通过。我倾向于强制安装,并记住模块可能存在一些小问题。