Centos 7 - perl: cpan을 통해 Crypt::OpenSSL::EC를 설치할 수 없습니다.

Centos 7 - perl: cpan을 통해 Crypt::OpenSSL::EC를 설치할 수 없습니다.

cpan을 사용하여 Crypt::OpenSSL::EC를 설치하려고 하면 다음과 같은 결과가 나타납니다.

$ cpan install Crypt::OpenSSL::EC
Reading '/home/vafbuild/.cpan/Metadata'
  Database was generated on Mon, 05 Dec 2016 10:41:02 GMT
Running install for module 'Crypt::OpenSSL::EC'
Running make for M/MI/MIKEM/Crypt-OpenSSL-EC-1.01.tar.gz
length() used on @array (did you mean "scalar(@array)"?) at /usr/lib64/perl5/IO/Compress/Zlib/Extra.pm line 198.
Checksum for /home/vafbuild/.cpan/sources/authors/id/M/MI/MIKEM/Crypt-OpenSSL-EC-1.01.tar.gz ok

  CPAN.pm: Building M/MI/MIKEM/Crypt-OpenSSL-EC-1.01.tar.gz

Checking if your kit is complete...
Looks good
Generating a Unix-style Makefile
Writing Makefile for Crypt::OpenSSL::EC
Writing MYMETA.yml and MYMETA.json
cp lib/Crypt/OpenSSL/EC.pm blib/lib/Crypt/OpenSSL/EC.pm
AutoSplitting blib/lib/Crypt/OpenSSL/EC.pm (blib/lib/auto/Crypt/OpenSSL/EC)
Running Mkbootstrap for EC ()
chmod 644 "EC.bs"
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- EC.bs blib/arch/auto/Crypt/OpenSSL/EC/EC.bs 644
"/usr/bin/perl" "/usr/share/perl5/vendor_perl/ExtUtils/xsubpp"  -typemap '/usr/share/perl5/ExtUtils/typemap' -typemap '/home/vafbuild/.cpan/build/Crypt-OpenSSL-EC-1.01-Vi3UNF/typemap'  EC.xs > EC.xsc
mv EC.xsc EC.c
gcc -c  -I. -I/usr/include -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic   -DVERSION=\"1.01\" -DXS_VERSION=\"1.01\" -fPIC "-I/usr/lib64/perl5/CORE"  -DPERL5 -DOPENSSL_NO_KRB5 EC.c
In file included from /usr/lib64/perl5/CORE/perl.h:5071:0,
                 from EC.xs:2:
EC.c: In function ‘XS_Crypt__OpenSSL__EC_constant’:
/usr/lib64/perl5/CORE/embed.h:609:37: warning: ‘iv’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 #define sv_setiv(a,b)  Perl_sv_setiv(aTHX_ a,b)
                                     ^
./const-xs.inc:11:6: note: ‘iv’ was declared here
  IV  iv;
      ^
rm -f blib/arch/auto/Crypt/OpenSSL/EC/EC.so
LD_RUN_PATH="/lib64" gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -Wl,-z,relro  EC.o  -o blib/arch/auto/Crypt/OpenSSL/EC/EC.so  \
   -L/usr/lib -lcrypto   \

chmod 755 blib/arch/auto/Crypt/OpenSSL/EC/EC.so
Manifying 1 pod document
  MIKEM/Crypt-OpenSSL-EC-1.01.tar.gz
  /usr/bin/make -- OK
Running make test
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- EC.bs blib/arch/auto/Crypt/OpenSSL/EC/EC.bs 644
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/Crypt-OpenSSL-EC.t .. ok     
t/prime-field.t ....... 1/263 
#   Failed test at t/prime-field.t line 36.

#   Failed test at t/prime-field.t line 43.
Use of uninitialized value $msg in concatenation (.) or string at /home/vafbuild/.cpan/build/Crypt-OpenSSL-EC-1.01-Vi3UNF/blib/lib/Crypt/OpenSSL/EC.pm line 413.
 17078: 1 - error:100A6083:elliptic curve routines:ec_GFp_simple_group_set_curve:unsupported field
Use of uninitialized value $msg in concatenation (.) or string at /home/vafbuild/.cpan/build/Crypt-OpenSSL-EC-1.01-Vi3UNF/blib/lib/Crypt/OpenSSL/EC.pm line 413.
 17078: 2 - error:1008506F:elliptic curve routines:ec_GFp_mont_field_decode:not initialized

#   Failed test at t/prime-field.t line 70.

#   Failed test at t/prime-field.t line 103.

#   Failed test at t/prime-field.t line 110.

#   Failed test at t/prime-field.t line 117.

#   Failed test at t/prime-field.t line 119.

#   Failed test at t/prime-field.t line 126.

#   Failed test at t/prime-field.t line 131.

#   Failed test at t/prime-field.t line 137.

#   Failed test at t/prime-field.t line 144.

#   Failed test at t/prime-field.t line 320.

#   Failed test at t/prime-field.t line 323.

#   Failed test at t/prime-field.t line 324.

#   Failed test at t/prime-field.t line 329.

#   Failed test at t/prime-field.t line 335.

#   Failed test at t/prime-field.t line 340.

#   Failed test at t/prime-field.t line 157.

#   Failed test at t/prime-field.t line 160.

#   Failed test at t/prime-field.t line 165.

#   Failed test at t/prime-field.t line 167.

#   Failed test at t/prime-field.t line 168.

#   Failed test at t/prime-field.t line 320.

#   Failed test at t/prime-field.t line 323.

#   Failed test at t/prime-field.t line 324.

#   Failed test at t/prime-field.t line 329.

#   Failed test at t/prime-field.t line 335.

#   Failed test at t/prime-field.t line 340.

#   Failed test at t/prime-field.t line 182.

#   Failed test at t/prime-field.t line 185.

#   Failed test at t/prime-field.t line 190.

#   Failed test at t/prime-field.t line 192.

#   Failed test at t/prime-field.t line 193.

#   Failed test at t/prime-field.t line 320.

#   Failed test at t/prime-field.t line 323.

#   Failed test at t/prime-field.t line 324.

#   Failed test at t/prime-field.t line 329.

#   Failed test at t/prime-field.t line 335.

#   Failed test at t/prime-field.t line 340.
# Looks like you planned 263 tests but ran 245.
# Looks like you failed 39 tests of 245 run.
t/prime-field.t ....... Dubious, test returned 39 (wstat 9984, 0x2700)
Failed 57/263 subtests 

Test Summary Report
-------------------
t/prime-field.t     (Wstat: 9984 Tests: 245 Failed: 39)
  Failed tests:  11, 14, 26, 36, 40, 44-47, 50, 52, 62, 64-65
                68, 71, 74, 78-79, 82-84, 94, 96-97, 100
                103, 106, 110-111, 114-116, 126, 128-129
                132, 135, 138
  Non-zero exit status: 39
  Parse errors: Bad plan.  You planned 263 tests but ran 245.
Files=2, Tests=264,  1 wallclock secs ( 0.08 usr  0.01 sys +  0.20 cusr  0.03 csys =  0.32 CPU)
Result: FAIL
Failed 1/2 test programs. 39/264 subtests failed.
make: *** [test_dynamic] Error 39
  MIKEM/Crypt-OpenSSL-EC-1.01.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports MIKEM/Crypt-OpenSSL-EC-1.01.tar.gz
Running make install
  make test had returned bad status, won't install without force

답변1

cpanm설치 모듈을 사용하는 것이 좋습니다 perl.

설치하다 cpanm:

sudo cpan App::cpanminus

그런 다음 다음을 설치하십시오 Crypt::OpenSSL::EC.

sudo cpanm Crypt::OpenSSL::EC

답변2

rt.cpan.org/Public/Bug/Display.html?id=104000 모듈을 통한 문제 대기열은 모듈을 패치하는 것(또는 OpenSSL의 RedHat이 아닌 버전을 구축하는 것)이 갈 길일 수 있음을 나타냅니다. – 4시간 전

에 대한 답변트리거댓글을 통해 문제가 해결되었습니다. 이전에 이 티켓을 보고 내 openssl이 해당 옵션으로 컴파일되었는지 확인했지만 "openssl version -a"라는 출력이 표시되지 않습니다. 몇 시간의 테스트 후에 이 패치를 사용해 보았습니다.

관련 정보