3

I have installed openssl library, but I still fail to install the module.

I get the following output:

Checking if your kit is complete...
Looks good
Warning (mostly harmless): No library found for -lssl32
Warning (mostly harmless): No library found for -lssleay32
Warning (mostly harmless): No library found for -leay32
Warning (mostly harmless): No library found for -llibeay32
Generating a Unix-style Makefile
Writing Makefile for Crypt::SSLeay
Writing MYMETA.yml and MYMETA.json
  NANIS/Crypt-SSLeay-0.72.tar.gz
  /usr/bin/perl Makefile.PL INSTALLDIRS=site -- OK
Running make for N/NA/NANIS/Crypt-SSLeay-0.72.tar.gz
cp lib/Crypt/SSLeay/CTX.pm blib/lib/Crypt/SSLeay/CTX.pm
cp lib/Crypt/SSLeay/X509.pm blib/lib/Crypt/SSLeay/X509.pm
cp lib/Net/SSL.pm blib/lib/Net/SSL.pm
cp lib/Crypt/SSLeay/Err.pm blib/lib/Crypt/SSLeay/Err.pm
cp lib/Crypt/SSLeay/Conn.pm blib/lib/Crypt/SSLeay/Conn.pm
cp SSLeay.pm blib/lib/Crypt/SSLeay.pm
cp lib/Crypt/SSLeay/Version.pm blib/lib/Crypt/SSLeay/Version.pm
cp lib/Crypt/SSLeay/MainContext.pm blib/lib/Crypt/SSLeay/MainContext.pm
Running Mkbootstrap for Crypt::SSLeay ()
chmod 644 "SSLeay.bs"
"/usr/bin/perl" "/usr/share/perl/5.22/ExtUtils/xsubpp"  -typemap "/usr/share/perl/5.22/ExtUtils/typemap" -typemap "typemap"  SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
x86_64-linux-gnu-gcc -c   -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fwrapv -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g   -DVERSION=\"0.72\" -DXS_VERSION=\"0.72\" -fPIC "-I/usr/lib/x86_64-linux-gnu/perl/5.22/CORE"   SSLeay.c
SSLeay.xs: In function ‘XS_Crypt__SSLeay__CTX_new’:
SSLeay.xs:152:31: warning: implicit declaration of function ‘SSLv3_client_method’ [-Wimplicit-function-declaration]
             ctx = SSL_CTX_new(SSLv3_client_method());
                               ^
SSLeay.xs:152:31: warning: passing argument 1 of ‘SSL_CTX_new’ makes pointer from integer without a cast [-Wint-conversion]
In file included from SSLeay.xs:35:0:
/usr/local/include/openssl/ssl.h:1305:17: note: expected ‘const SSL_METHOD * {aka const struct ssl_method_st *}’ but argument is of type ‘int’
 __owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
                 ^
SSLeay.xs:157:31: warning: implicit declaration of function ‘SSLv2_client_method’ [-Wimplicit-function-declaration]
             ctx = SSL_CTX_new(SSLv2_client_method());
                               ^
SSLeay.xs:157:31: warning: passing argument 1 of ‘SSL_CTX_new’ makes pointer from integer without a cast [-Wint-conversion]
In file included from SSLeay.xs:35:0:
/usr/local/include/openssl/ssl.h:1305:17: note: expected ‘const SSL_METHOD * {aka const struct ssl_method_st *}’ but argument is of type ‘int’
 __owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
                 ^
rm -f blib/arch/auto/Crypt/SSLeay/SSLeay.so
x86_64-linux-gnu-gcc  -shared -L/usr/local/lib -fstack-protector-strong SSLeay.o  -o blib/arch/auto/Crypt/SSLeay/SSLeay.so  \
   -lssl -lcrypto -lz   \
  
chmod 755 blib/arch/auto/Crypt/SSLeay/SSLeay.so
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- SSLeay.bs blib/arch/auto/Crypt/SSLeay/SSLeay.bs 644
Manifying 3 pod documents
  NANIS/Crypt-SSLeay-0.72.tar.gz
  /usr/bin/make -- OK

It seems the make procedure works well, but then the test procedure fails, the output is as follows:

Running make test
Running Mkbootstrap for Crypt::SSLeay ()
chmod 644 "SSLeay.bs"
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/00-basic.t ..... 1/? 
#   Failed test 'use Crypt::SSLeay;'
#   at t/00-basic.t line 6.
#     Tried to use 'Crypt::SSLeay'.
#     Error:  Can't load '/home/dcsunset/.cpan/build/Crypt-SSLeay-0.72-eYwzMd/blib/arch/auto/Crypt/SSLeay/SSLeay.so' for module Crypt::SSLeay: /home/dcsunset/.cpan/build/Crypt-SSLeay-0.72-eYwzMd/blib/arch/auto/Crypt/SSLeay/SSLeay.so: undefined symbol: SSLv2_client_method at /usr/lib/x86_64-linux-gnu/perl/5.22/DynaLoader.pm line 187.
#  at t/00-basic.t line 6.
# Compilation failed in require at t/00-basic.t line 6.
# BEGIN failed--compilation aborted at t/00-basic.t line 6.

#   Failed test 'use Crypt::SSLeay::CTX;'
#   at t/00-basic.t line 7.
#     Tried to use 'Crypt::SSLeay::CTX'.
#     Error:  Attempt to reload Crypt/SSLeay.pm aborted.
# Compilation failed in require at /home/dcsunset/.cpan/build/Crypt-SSLeay-0.72-eYwzMd/blib/lib/Crypt/SSLeay/CTX.pm line 2.
# Compilation failed in require at t/00-basic.t line 7.
# BEGIN failed--compilation aborted at t/00-basic.t line 7.

#   Failed test 'use Crypt::SSLeay::Conn;'
#   at t/00-basic.t line 8.
#     Tried to use 'Crypt::SSLeay::Conn'.
#     Error:  Attempt to reload Crypt/SSLeay.pm aborted.
# Compilation failed in require at /home/dcsunset/.cpan/build/Crypt-SSLeay-0.72-eYwzMd/blib/lib/Crypt/SSLeay/Conn.pm line 2.
# Compilation failed in require at t/00-basic.t line 8.
# BEGIN failed--compilation aborted at t/00-basic.t line 8.

#   Failed test 'use Crypt::SSLeay::Err;'
#   at t/00-basic.t line 9.
#     Tried to use 'Crypt::SSLeay::Err'.
#     Error:  Attempt to reload Crypt/SSLeay.pm aborted.
# Compilation failed in require at /home/dcsunset/.cpan/build/Crypt-SSLeay-0.72-eYwzMd/blib/lib/Crypt/SSLeay/Err.pm line 2.
# Compilation failed in require at t/00-basic.t line 9.
# BEGIN failed--compilation aborted at t/00-basic.t line 9.

#   Failed test 'use Crypt::SSLeay::MainContext;'
#   at t/00-basic.t line 10.
#     Tried to use 'Crypt::SSLeay::MainContext'.
#     Error:  Attempt to reload Crypt/SSLeay/CTX.pm aborted.
# Compilation failed in require at /home/dcsunset/.cpan/build/Crypt-SSLeay-0.72-eYwzMd/blib/lib/Crypt/SSLeay/MainContext.pm line 8.
# Compilation failed in require at t/00-basic.t line 10.
# BEGIN failed--compilation aborted at t/00-basic.t line 10.

#   Failed test 'use Crypt::SSLeay::Version;'
#   at t/00-basic.t line 12.
#     Tried to use 'Crypt::SSLeay::Version'.
#     Error:  Attempt to reload Crypt/SSLeay.pm aborted.
# Compilation failed in require at /home/dcsunset/.cpan/build/Crypt-SSLeay-0.72-eYwzMd/blib/lib/Crypt/SSLeay/Version.pm line 2.
# Compilation failed in require at t/00-basic.t line 12.
# BEGIN failed--compilation aborted at t/00-basic.t line 12.

#   Failed test 'use Net::SSL;'
#   at t/00-basic.t line 23.
#     Tried to use 'Net::SSL'.
#     Error:  Attempt to reload Crypt/SSLeay.pm aborted.
# Compilation failed in require at /home/dcsunset/.cpan/build/Crypt-SSLeay-0.72-eYwzMd/blib/lib/Net/SSL.pm line 20.
# Compilation failed in require at t/00-basic.t line 23.
# BEGIN failed--compilation aborted at t/00-basic.t line 23.
Undefined subroutine &main::main_ctx called at t/00-basic.t line 49.
# Tests were run but no plan was declared and done_testing() was not seen.
# Looks like your test exited with 2 just after 13.

Is there something wrong?

5
  • 1
    You have a fairly modern system. Do not install Crypt::SSLeay. Any programmer who declares a dependency on Crypt::SSLeay is doing it wrong. Use Net::SSLeay and IO::Socket::SSL. Jun 22, 2017 at 11:04
  • @SinanÜnür Thanks for your reply. Actually, some existing software depends on that, and I have to install it to run the software.
    – Arolia
    Jun 23, 2017 at 1:50
  • 1
    I am 99% certain the software you mention only needs to depend on LWP::Protocol::https and not Crypt::SSLeay. Declaring a dependency on Crypt::SSLeay is wrong in almost all cases. Jun 23, 2017 at 2:08
  • @SinanÜnür Thanks. I'll try that.
    – Arolia
    Jun 23, 2017 at 13:21
  • 1
    Actually, installing Crypt::SSLeay installs LWP::Protocol::https which also causes IO::Socket::SSL and Net::SSLeay to be installed thereby ensuring your code will not use Crypt::SSLeay unless you take specific steps to force its use (which I don't recommend). That is my way of spreading the modern libraries to places where people think they need to declare an explicit dependency on Crypt::SSLeay. Jun 23, 2017 at 13:28

1 Answer 1

8

Do you want to install this in the system library? Perhaps just use the pre-packaged version.

$ sudo apt-get install libcrypt-ssleay-perl
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.