5

我想通过我的 perl 脚本安装和使用 ZeroMQ。我试图从 CPAN 安装 ZeroMQ,但在最后一步安装失败说:

ZeroMQ-0.21/eg/threaded_server.pl
---- Unsatisfied dependencies detected during ----
----         DMAKI/ZeroMQ-0.21.tar.gz         ----
    Devel::CheckLib [build_requires]
    ExtUtils::MakeMaker [build_requires]
Running make test
  Make had some problems, won't test
  Delayed until after prerequisites
Running make install
  Make had some problems, won't install
  Delayed until after prerequisites
..........
.............

blib\script\use-devel-checklib
        pl2bat.bat blib\script\use-devel-checklib
  MATTN/Devel-CheckLib-0.98.tar.gz
  C:\PROGRA~2\MICROS~1.0\VC\bin\nmake.exe -- OK
Running make test

Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
Copyright (C) Microsoft Corporation.  All rights reserved.

        C:\Perl5.14\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib\lib', 'blib\arch')" t/*.t
t/00-load.t ................... ok
t/bad-single-word-compiler.t .. ok
t/cmdline-LIBS-INC.t .......... skipped: Couldn't build a library to test against
t/custom-function.t ........... skipped: Couldn't build a library to test against
t/dash-l-libs.t ............... skipped: Couldn't build a library to test against
t/exit_with_message.t ......... ok
t/found.t .....................
t/found.t ..................... 1/6 #   Failed test 'lib => 'msvcrt''
   at t/found.t line 53.
          got: 'Can't link/include C library 'msvcrt', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test '... and check_lib is true'
   at t/found.t line 54.

   Failed test 'lib => 'kernel32''
   at t/found.t line 53.
          got: 'Can't link/include C library 'kernel32', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test '... and check_lib is true'
   at t/found.t line 54.

   Failed test 'lib => ['msvcrt', 'kernel32']'
   at t/found.t line 53.
          got: 'Can't link/include C library 'msvcrt', 'kernel32', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test '... and check_lib is true'
   at t/found.t line 54.
 Looks like you failed 6 tests of 6.
t/found.t ..................... Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/6 subtests
t/headers.t ................... 1/5
   Failed test 'incpath => '.',         header => 't/inc/headerfile.h''
t/headers.t ................... 3/5 #   at t/headers.t line 47.
          got: 'Can't link/include C library 't/inc/headerfile.h', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test 'incpath => [qw(t/inc)], header => 'headerfile.h''
   at t/headers.t line 47.
          got: 'Can't link/include C library 'headerfile.h', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:

   Failed test 'INC => '-I. -It/inc',   header => 'headerfile.h''
   at t/headers.t line 47.
          got: 'Can't link/include C library 'headerfile.h', aborting.
 '
     expected: ''
       STDOUT:
       STDERR:
 Looks like you failed 3 tests of 5.
t/headers.t ................... Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/5 subtests
t/multi-word-compiler.t ....... ok
t/not_found.t ................. 3/12
   Failed test 'missing 'foo' detected'
   at t/not_found.t line 39.
                   'Can't link/include C library 'msvcrt', 'foo', aborting.
 '
     doesn't match '/^Can't link/include C library 'foo'/ms'
 Looks like you failed 1 test of 12.
t/not_found.t ................. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/12 subtests

Test Summary Report
-------------------
t/found.t                   (Wstat: 1536 Tests: 6 Failed: 6)
  Failed tests:  1-6
  Non-zero exit status: 6
t/headers.t                 (Wstat: 768 Tests: 5 Failed: 3)
  Failed tests:  3-5
  Non-zero exit status: 3
t/not_found.t               (Wstat: 256 Tests: 12 Failed: 1)
  Failed test:  5
  Non-zero exit status: 1
Files=10, Tests=27,  9 wallclock secs ( 0.09 usr +  0.06 sys =  0.16 CPU)
Result: FAIL
Failed 3/10 test programs. 10/27 subtests failed.
NMAKE : fatal error U1077: 'C:\Perl5.14\bin\perl.exe' : return code '0x1'
Stop.
  MATTN/Devel-CheckLib-0.98.tar.gz
  C:\PROGRA~2\MICROS~1.0\VC\bin\nmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MATTN/Devel-CheckLib-0.98.tar.gz
Running make install
  make test had returned bad status, won't install without force
Running install for module 'ExtUtils::MakeMaker'
Running make for M/MS/MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz
Checksum for C:\Perl5.14\cpan\sources\authors\id\M\MS\MSCHWERN\ExtUtils-MakeMaker-6.62.tar.gz ok
........
........
t/Liblist_Kid.t ........... 1/? Note (probably harmless): No library found for unreal_test
Note (probably harmless): No library found for unreal_test
Note (probably harmless): No library found for -llibtest
Note (probably harmless): No library found for -lunreal_test
Note (probably harmless): No library found for unreal_test
Note (probably harmless): No library found for dir_test
Warning: '-Ldir' changed to '-LC:/Perl5.14/cpan/build/ExtUtils-MakeMaker-6.62-IJCHpC/t/liblist/win32/dir'
Warning: '-Ldi r' changed to '-LC:/Perl5.14/cpan/build/ExtUtils-MakeMaker-6.62-IJCHpC/t/liblist/win32/di r'
Note (probably harmless): No library found for unreal_test
Note (probably harmless): No library found for unreal_test
t/Liblist_Kid.t ........... ok
...........
...........
t/MM_Win32.t .............. 1/61
   Failed test 'pasthru()'
   at t/MM_Win32.t line 273.
          got: 'PASTHRU = -nologo'
     expected: 'PASTHRU = '
 Looks like you failed 1 test of 61.
t/MM_Win32.t .............. Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/61 subtests
        (less 6 skipped subtests: 54 okay)
................
................

t/xs.t .................... skipped: ExtUtils::CBuilder not installed or couldn't find a compiler

Test Summary Report
t/MM_Win32.t            (Wstat: 256 Tests: 61 Failed: 1)
  Failed test:  49
  Non-zero exit status: 1
Files=59, Tests=976, 139 wallclock secs ( 0.47 usr +  0.17 sys =  0.64 CPU)
Result: FAIL
Failed 1/59 test programs. 1/976 subtests failed.
NMAKE : fatal error U1077: 'C:\Perl5.14\bin\perl.exe' : return code '0xff'
Stop.
  MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz
  C:\PROGRA~2\MICROS~1.0\VC\bin\nmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz
Running make install
  make test had returned bad status, won't install without force
Running make for D/DM/DMAKI/ZeroMQ-0.21.tar.gz
Warning: Prerequisite 'Devel::CheckLib => 0.4' for 'DMAKI/ZeroMQ-0.21.tar.gz' failed when processing 'MATTN/Devel-CheckLib-0.98.tar.gz' with 'make_test =
chances to succeed are limited.
Warning: Prerequisite 'ExtUtils::MakeMaker => 6.62' for 'DMAKI/ZeroMQ-0.21.tar.gz' failed when processing 'MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz' with
inuing, but chances to succeed are limited.

  CPAN.pm: Going to build D/DM/DMAKI/ZeroMQ-0.21.tar.gz

Probing environment variables:
 + Detected ZMQ_INCLUDES from ZMQ_HOME...
 + Detected ZMQ_LIBS from ZMQ_HOME...
Probing libzmq via pkg-config ...
Package libzmq was not found in the pkg-config search path.
Perhaps you should add the directory containing `libzmq.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libzmq' found
 - No libzmq found...
Probing zeromq2 via pkg-config ...
Package zeromq2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `zeromq2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'zeromq2' found
 - No zeromq2 found...
Detected the following ZMQ settings:
 + ZMQ_HOME = C:\Users\kallol\Desktop\perl_test\zeromq-2.2.0
 + ZMQ_H = C:\Users\kallol\Desktop\perl_test\zeromq-2.2.0\include
 + ZMQ_INCLUDES = C:\Users\kallol\Desktop\perl_test\zeromq-2.2.0\include
 + ZMQ_LIBS = -LC:\Users\kallol\Desktop\perl_test\zeromq-2.2.0\lib
 + ZMQ_TRACE = (null)
Can't link/include C library 'zmq.h', 'zmq', aborting.
Warning: No success on command[C:\Perl5.14\bin\perl.exe Makefile.PL INSTALLDIRS=site]
  DMAKI/ZeroMQ-0.21.tar.gz
  C:\Perl5.14\bin\perl.exe Makefile.PL INSTALLDIRS=site -- NOT OK
Running make test
  Make had some problems, won't test
Running make install
  Make had some problems, won't install
Failed during this command:
 MATTN/Devel-CheckLib-0.98.tar.gz             : make_test NO
 MSCHWERN/ExtUtils-MakeMaker-6.62.tar.gz      : make_test NO
 DMAKI/ZeroMQ-0.21.tar.gz                     : writemakefile NO 'C:\Perl5.14\bin\perl.exe Makefile.PL INSTALLDIRS=site' returned status 512

安装程序似乎使用 Visual C 2010 中的 nmake。

4

3 回答 3

1

您的系统无法安装两个依赖项,整个工具链都被破坏了。我将如何解决它:

  1. 卸载 MSVC 和 nmake。
  2. 升级到受支持的 ActivePerl (5.14) 版本。
  3. MinGW使用 ppm安装软件包。这为您提供了适当的编译器。
  4. 安装ExtUtils::MakeMakerDevel::CheckLib.
  5. ZeroMQ像以前一样安装。
于 2012-05-29T17:44:51.367 回答
0

ZeroMQ 已被弃用:请参阅 perldoc 了解 ZeroMQ!

Please note that this module has been DEPRECATED in favor of ZMQ::LibZMQ2, ZMQ::LibZMQ3, and ZMQ. see https://github.com/lestrrat/p5-ZMQ and other CPAN pages.
于 2015-03-06T18:42:06.440 回答
0

您必须安装 C 编译器。我们检查 $Config{cc},无论是在 Config.pm 中还是在 $PATH 中。根据 Devel-CheckLib-0.98

尝试将 cl 添加到您的 PATH 或在 Visual Studio 命令提示符下运行 all

于 2013-01-24T04:55:42.527 回答