代码之家  ›  专栏  ›  技术社区  ›  Stephen RC

无法通过Perl CPAN安装Crypt::OpenPGP

  •  0
  • Stephen RC  · 技术社区  · 16 年前

    我正在尝试安装 隐窝::OpenPGP 模块通过 Perl CPAN 运气不好。我收到的错误是:

    Failed Test   Stat Wstat Total Fail  Failed  List of Failed
    -------------------------------------------------------------------------------
    t/07-digest.t    1   256    15    1   6.67%  15
    Failed 1/14 test scripts, 92.86% okay. 1/273 subtests failed, 99.63% okay.
    make: *** [test_dynamic] Error 255
      /usr/bin/make test -- NOT OK
    Running make install
      make test had returned bad status, won't install without force
    

    我正在重新安装 CentOS 5.5版(最终版) ,我安装了perl via' yum安装perl 然后进入CPAN 珀尔-麦克潘-埃塞尔 ,并完成了我尝试运行的脚本所需的模块列表。我得到了 隐窝::OpenPGP 在命中此错误之前。

    我可能错过了一些非常明显的东西,但有人能给我指出正确的方向吗?

    我的安装尝试的完整日志:

    cpan> install Crypt::OpenPGP
    Running install for module Crypt::OpenPGP
    Running make for B/BT/BTROTT/Crypt-OpenPGP-1.04.tar.gz
      Is already unwrapped into directory /root/.cpan/build/Crypt-OpenPGP-1.04
    
      CPAN.pm: Going to build B/BT/BTROTT/Crypt-OpenPGP-1.04.tar.gz
    
    Checking if your kit is complete...
    Looks good
    Writing Makefile for Crypt::OpenPGP
    cp lib/Crypt/OpenPGP/Words.pm blib/lib/Crypt/OpenPGP/Words.pm
    cp lib/Crypt/OpenPGP/Digest.pm blib/lib/Crypt/OpenPGP/Digest.pm
    cp lib/Crypt/OpenPGP/Key.pm blib/lib/Crypt/OpenPGP/Key.pm
    cp lib/Crypt/OpenPGP/KeyRing.pm blib/lib/Crypt/OpenPGP/KeyRing.pm
    cp lib/Crypt/OpenPGP/Cipher.pm blib/lib/Crypt/OpenPGP/Cipher.pm
    cp lib/Crypt/OpenPGP/S2k.pm blib/lib/Crypt/OpenPGP/S2k.pm
    cp lib/Crypt/OpenPGP/Armour.pm blib/lib/Crypt/OpenPGP/Armour.pm
    cp lib/Crypt/OpenPGP/Certificate.pm blib/lib/Crypt/OpenPGP/Certificate.pm
    cp lib/Crypt/OpenPGP/Compressed.pm blib/lib/Crypt/OpenPGP/Compressed.pm
    cp lib/Crypt/OpenPGP/Message.pm blib/lib/Crypt/OpenPGP/Message.pm
    cp lib/Crypt/OpenPGP/Util.pm blib/lib/Crypt/OpenPGP/Util.pm
    cp lib/Crypt/OpenPGP/OnePassSig.pm blib/lib/Crypt/OpenPGP/OnePassSig.pm
    cp lib/Crypt/OpenPGP/Signature/SubPacket.pm blib/lib/Crypt/OpenPGP/Signature/SubPacket.pm
    cp lib/Crypt/OpenPGP/Key/Public.pm blib/lib/Crypt/OpenPGP/Key/Public.pm
    cp lib/Crypt/OpenPGP.pm blib/lib/Crypt/OpenPGP.pm
    cp lib/Crypt/OpenPGP/SKSessionKey.pm blib/lib/Crypt/OpenPGP/SKSessionKey.pm
    cp lib/Crypt/OpenPGP/MDC.pm blib/lib/Crypt/OpenPGP/MDC.pm
    cp lib/Crypt/OpenPGP/CFB.pm blib/lib/Crypt/OpenPGP/CFB.pm
    cp lib/Crypt/OpenPGP/PacketFactory.pm blib/lib/Crypt/OpenPGP/PacketFactory.pm
    cp lib/Crypt/OpenPGP/Key/Public/RSA.pm blib/lib/Crypt/OpenPGP/Key/Public/RSA.pm
    cp lib/Crypt/OpenPGP/Signature.pm blib/lib/Crypt/OpenPGP/Signature.pm
    cp lib/Crypt/OpenPGP/Key/Secret/DSA.pm blib/lib/Crypt/OpenPGP/Key/Secret/DSA.pm
    cp lib/Crypt/OpenPGP/Marker.pm blib/lib/Crypt/OpenPGP/Marker.pm
    cp lib/Crypt/OpenPGP/Key/Public/DSA.pm blib/lib/Crypt/OpenPGP/Key/Public/DSA.pm
    cp lib/Crypt/OpenPGP/Buffer.pm blib/lib/Crypt/OpenPGP/Buffer.pm
    cp lib/Crypt/OpenPGP/KeyBlock.pm blib/lib/Crypt/OpenPGP/KeyBlock.pm
    cp lib/Crypt/OpenPGP/ErrorHandler.pm blib/lib/Crypt/OpenPGP/ErrorHandler.pm
    cp lib/Crypt/OpenPGP/Key/Secret.pm blib/lib/Crypt/OpenPGP/Key/Secret.pm
    cp lib/Crypt/OpenPGP/Key/Secret/RSA.pm blib/lib/Crypt/OpenPGP/Key/Secret/RSA.pm
    cp lib/Crypt/OpenPGP/KeyServer.pm blib/lib/Crypt/OpenPGP/KeyServer.pm
    cp lib/Crypt/OpenPGP/Config.pm blib/lib/Crypt/OpenPGP/Config.pm
    cp lib/Crypt/OpenPGP/Key/Public/ElGamal.pm blib/lib/Crypt/OpenPGP/Key/Public/ElGamal.pm
    cp lib/Crypt/OpenPGP/SessionKey.pm blib/lib/Crypt/OpenPGP/SessionKey.pm
    cp lib/Crypt/OpenPGP/Key/Secret/ElGamal.pm blib/lib/Crypt/OpenPGP/Key/Secret/ElGamal.pm
    cp lib/Crypt/OpenPGP/Constants.pm blib/lib/Crypt/OpenPGP/Constants.pm
    cp lib/Crypt/OpenPGP/Trust.pm blib/lib/Crypt/OpenPGP/Trust.pm
    cp lib/Crypt/OpenPGP/UserID.pm blib/lib/Crypt/OpenPGP/UserID.pm
    cp lib/Crypt/OpenPGP/Plaintext.pm blib/lib/Crypt/OpenPGP/Plaintext.pm
    cp lib/Crypt/OpenPGP/Ciphertext.pm blib/lib/Crypt/OpenPGP/Ciphertext.pm
    Manifying blib/man3/Crypt::OpenPGP::Words.3pm
    Manifying blib/man3/Crypt::OpenPGP::Digest.3pm
    Manifying blib/man3/Crypt::OpenPGP::Buffer.3pm
    Manifying blib/man3/Crypt::OpenPGP::Key.3pm
    Manifying blib/man3/Crypt::OpenPGP::KeyRing.3pm
    Manifying blib/man3/Crypt::OpenPGP::Cipher.3pm
    Manifying blib/man3/Crypt::OpenPGP::KeyBlock.3pm
    Manifying blib/man3/Crypt::OpenPGP::ErrorHandler.3pm
    Manifying blib/man3/Crypt::OpenPGP::S2k.3pm
    Manifying blib/man3/Crypt::OpenPGP::Certificate.3pm
    Manifying blib/man3/Crypt::OpenPGP::Armour.3pm
    Manifying blib/man3/Crypt::OpenPGP::KeyServer.3pm
    Manifying blib/man3/Crypt::OpenPGP::Message.3pm
    Manifying blib/man3/Crypt::OpenPGP::Compressed.3pm
    Manifying blib/man3/Crypt::OpenPGP::OnePassSig.3pm
    Manifying blib/man3/Crypt::OpenPGP::Util.3pm
    Manifying blib/man3/Crypt::OpenPGP::SessionKey.3pm
    Manifying blib/man3/Crypt::OpenPGP.3pm
    Manifying blib/man3/Crypt::OpenPGP::SKSessionKey.3pm
    Manifying blib/man3/Crypt::OpenPGP::Constants.3pm
    Manifying blib/man3/Crypt::OpenPGP::MDC.3pm
    Manifying blib/man3/Crypt::OpenPGP::PacketFactory.3pm
    Manifying blib/man3/Crypt::OpenPGP::CFB.3pm
    Manifying blib/man3/Crypt::OpenPGP::Trust.3pm
    Manifying blib/man3/Crypt::OpenPGP::UserID.3pm
    Manifying blib/man3/Crypt::OpenPGP::Signature.3pm
    Manifying blib/man3/Crypt::OpenPGP::Marker.3pm
    Manifying blib/man3/Crypt::OpenPGP::Plaintext.3pm
    Manifying blib/man3/Crypt::OpenPGP::Ciphertext.3pm
      /usr/bin/make  -- OK
    Running make test
    PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
    t/00-compile.....ok                                                          
    t/01-util........ok                                                          
    t/02-buffer......ok                                                          
    t/03-3des........ok                                                          
    t/04-armour......ok                                                          
    t/05-packets.....ok                                                          
    t/06-cipher......# CAST5
    t/06-cipher......ok 1/56# Rijndael                                           
    # Rijndael256
    # DES3
    # Rijndael192
    # IDEA
    # Blowfish
    # Twofish
    t/06-cipher......ok                                                          
    t/07-digest......# MD5
    t/07-digest......ok 1/15# SHA1                                               
    # RIPEMD160
    
    t/07-digest......NOK 15#   Failed test 'digest data matches'                 
    #   at t/07-digest.t line 49.
    #          got: '����b�1�"X��6 �'
    #     expected: '��;�z&?���XLR߮�IL�'
    # Looks like you failed 1 test of 15.
    t/07-digest......dubious                                                     
        Test returned status 1 (wstat 256, 0x100)
    DIED. FAILED test 15
        Failed 1/15 tests, 93.33% okay
    t/08-compress....ok                                                          
    t/09-config......# GnuPG config
    t/09-config......ok 1/20# pgp2 config                                        
    t/09-config......ok                                                          
    t/10-keyring.....ok                                                          
    t/11-encrypt.....ok                                                          
    t/12-sign........ok 1/12# armoured sig                                       
    t/12-sign........ok 2/12# detached sig                                       
    # unarmoured sig
    # clear-text sig
    # sig generated using explicit Key
    t/12-sign........ok                                                          
    t/13-keygen......# RSA
    t/13-keygen......ok 1/28# DSA                                                
    t/13-keygen......ok                                                          
    Failed Test   Stat Wstat Total Fail  Failed  List of Failed
    -------------------------------------------------------------------------------
    t/07-digest.t    1   256    15    1   6.67%  15
    Failed 1/14 test scripts, 92.86% okay. 1/273 subtests failed, 99.63% okay.
    make: *** [test_dynamic] Error 255
      /usr/bin/make test -- NOT OK
    Running make install
      make test had returned bad status, won't install without force
    
    cpan> 
    

    安装crypt::ripemd160的输出:

    cpan> force install Crypt::RIPEMD160
    Running install for module Crypt::RIPEMD160
    Running make for C/CH/CHGEUER/Crypt-RIPEMD160-0.04.tar.gz
    Checksum for /root/.cpan/sources/authors/id/C/CH/CHGEUER/Crypt-RIPEMD160-0.04.tar.gz ok
    Crypt-RIPEMD160-0.04/
    Crypt-RIPEMD160-0.04/CHGEUER.asc
    Crypt-RIPEMD160-0.04/Makefile.PL
    Crypt-RIPEMD160-0.04/MANIFEST
    Crypt-RIPEMD160-0.04/misc/
    Crypt-RIPEMD160-0.04/misc/rfc2104.txt
    Crypt-RIPEMD160-0.04/misc/rfc2286.txt
    Crypt-RIPEMD160-0.04/misc/ripemd160_driver.pl
    Crypt-RIPEMD160-0.04/misc/speedtest.pl
    Crypt-RIPEMD160-0.04/README
    Crypt-RIPEMD160-0.04/RIPEMD160/
    Crypt-RIPEMD160-0.04/RIPEMD160/MAC.pm
    Crypt-RIPEMD160-0.04/RIPEMD160.pm
    Crypt-RIPEMD160-0.04/RIPEMD160.xs
    Crypt-RIPEMD160-0.04/rmd160/
    Crypt-RIPEMD160-0.04/rmd160/doc/
    Crypt-RIPEMD160-0.04/rmd160/doc/README
    Crypt-RIPEMD160-0.04/rmd160/doc/ripemd160.html
    Crypt-RIPEMD160-0.04/rmd160/hash/
    Crypt-RIPEMD160-0.04/rmd160/hash/hashtest.c
    Crypt-RIPEMD160-0.04/rmd160/hash/rmd128.c
    Crypt-RIPEMD160-0.04/rmd160/hash/rmd128.h
    Crypt-RIPEMD160-0.04/rmd160/hash/rmd160.c
    Crypt-RIPEMD160-0.04/rmd160/hash/rmd160.h
    Crypt-RIPEMD160-0.04/rmd160/mac/
    Crypt-RIPEMD160-0.04/rmd160/mac/mactest.c
    Crypt-RIPEMD160-0.04/rmd160/mac/rmd128mc.c
    Crypt-RIPEMD160-0.04/rmd160/mac/rmd128mc.h
    Crypt-RIPEMD160-0.04/rmd160/mac/rmd160mc.c
    Crypt-RIPEMD160-0.04/rmd160/mac/rmd160mc.h
    Crypt-RIPEMD160-0.04/rmd160.c
    Crypt-RIPEMD160-0.04/rmd160.h
    Crypt-RIPEMD160-0.04/test.pl
    Crypt-RIPEMD160-0.04/typemap
    Crypt-RIPEMD160-0.04/wrap_160.c
    Crypt-RIPEMD160-0.04/wrap_160.h
    Removing previously used /root/.cpan/build/Crypt-RIPEMD160-0.04
    
      CPAN.pm: Going to build C/CH/CHGEUER/Crypt-RIPEMD160-0.04.tar.gz
    
    Checking if your kit is complete...
    Looks good
    Writing Makefile for Crypt::RIPEMD160
    cp RIPEMD160/MAC.pm blib/lib/Crypt/RIPEMD160/MAC.pm
    cp RIPEMD160.pm blib/lib/Crypt/RIPEMD160.pm
    AutoSplitting blib/lib/Crypt/RIPEMD160.pm (blib/lib/auto/Crypt/RIPEMD160)
    /usr/bin/perl /usr/lib/perl5/5.8.8/ExtUtils/xsubpp  -typemap /usr/lib/perl5/5.8.8/ExtUtils/typemap -typemap typemap  RIPEMD160.xs > RIPEMD160.xsc && mv RIPEMD160.xsc RIPEMD160.c
    gcc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"  -DPERL_BYTEORDER=12345678 RIPEMD160.c
    RIPEMD160.xs: In function ‘XS_Crypt__RIPEMD160_add’:
    RIPEMD160.xs:55: warning: unused variable ‘svdata’
    RIPEMD160.xs: In function ‘XS_Crypt__RIPEMD160_digest’:
    RIPEMD160.xs:96: warning: pointer targets in passing argument 2 of ‘Perl_newSVpv’ differ in signedness
    RIPEMD160.c:147: warning: unused variable ‘RETVAL’
    gcc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"  -DPERL_BYTEORDER=12345678 rmd160.c
    gcc -c   -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   -DVERSION=\"0.04\" -DXS_VERSION=\"0.04\" -fPIC "-I/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/CORE"  -DPERL_BYTEORDER=12345678 wrap_160.c
    wrap_160.c: In function ‘RIPEMD160_final’:
    wrap_160.c:75: warning: implicit declaration of function ‘printf’
    wrap_160.c:75: warning: incompatible implicit declaration of built-in function ‘printf’
    wrap_160.c:75: warning: unknown conversion type character 0xa in format
    Running Mkbootstrap for Crypt::RIPEMD160 ()
    chmod 644 RIPEMD160.bs
    rm -f blib/arch/auto/Crypt/RIPEMD160/RIPEMD160.so
    gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic RIPEMD160.o rmd160.o wrap_160.o  -o blib/arch/auto/Crypt/RIPEMD160/RIPEMD160.so    \
                \
    
    chmod 755 blib/arch/auto/Crypt/RIPEMD160/RIPEMD160.so
    cp RIPEMD160.bs blib/arch/auto/Crypt/RIPEMD160/RIPEMD160.bs
    chmod 644 blib/arch/auto/Crypt/RIPEMD160/RIPEMD160.bs
    Manifying blib/man3/Crypt::RIPEMD160::MAC.3pm
    Manifying blib/man3/Crypt::RIPEMD160.3pm
      /usr/bin/make  -- OK
    Running make test
    PERL_DL_NONLAZY=1 /usr/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl
    1..25
    ok 1  (use Crypt::RIPEMD160;)
    ok 2  (new)
    not ok 3  (std-test-vectors)
    not ok 4  (A...Za...z0...9)
    e526f520264924744a76aa2a73e1325ac45083f0: not ok 5  (8 x "1234567890")
    3254f6d3d21de8b33df8e39b11988618a745d969: not ok 6  (1e6 x "a")
    ok 7  (Various flavours of file-handle to addfile)
    ok 8  (Fully qualified with ' operator)
    ok 9  (Fully qualified with :: operator)
    ok 10 (Type glob)
    ok 11 (Type glob reference (the prefered mechanism))
    ok 12 (File-handle passed by name (really the same as 9))
    ok 13 (Other ways of reading the data -- line at a time)
    ok 14 (Input lines as a list to add())
    ok 15 (Random chunks up to 128 bytes)
    ok 16 (All the data at once)
    ok 17 (Using static member function)
    not ok 18 (Crypt::RIPEMD160::MAC std-test-vector from RFC2286)
    not ok 19 (Crypt::RIPEMD160::MAC std-test-vector from RFC2286)
    not ok 20 (Crypt::RIPEMD160::MAC std-test-vector from RFC2286)
    not ok 21 (Crypt::RIPEMD160::MAC std-test-vector from RFC2286)
    not ok 22 (Crypt::RIPEMD160::MAC std-test-vector from RFC2286)
    not ok 23 (Crypt::RIPEMD160::MAC std-test-vector from RFC2286)
    not ok 24 (Crypt::RIPEMD160::MAC std-test-vector from RFC2286)
    not ok 25 (Crypt::RIPEMD160::MAC std-test-vector from RFC2286)
      /usr/bin/make test -- OK
    Running make install
    Manifying blib/man3/Crypt::RIPEMD160::MAC.3pm
    Manifying blib/man3/Crypt::RIPEMD160.3pm
    Files found in blib/arch: installing files in blib/lib into architecture dependent library tree
    Appending installation info to /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/perllocal.pod
      /usr/bin/make install  -- OK
    
    2 回复  |  直到 16 年前
        1
  •  2
  •   ysth    16 年前

    要修复crypt::ripemd160,请执行其他人建议的distroprefs文件:

    cpan
    look Crypt::RIPEMD160
    curl -sL http://search.cpan.org/CPAN/authors/id/A/AN/ANDK/patches/Crypt-RIPEMD160-0.04-Andrew_Ruthven-01.patch.gz | zcat | patch -p0
    perl Makefile.PL
    make all test install
    
        2
  •  3
  •   hobbs    16 年前

    这是crypt::ripemd160中的一个bug,它在64位系统上无法正常工作,如中所述。 RT#53323 和 RT#19138 . 您可以安装从rt_19138链接的distroprefs文件,然后使用cpan重新安装crypt::ripemd160,crypt::openpgp应该安装并正常工作。