Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Installing Net::SSLeay on Linux

by philosophia (Sexton)
on Mar 07, 2006 at 19:05 UTC ( [id://535000]=perlquestion: print w/replies, xml ) Need Help??

philosophia has asked for the wisdom of the Perl Monks concerning the following question:

perl 5.8.7 on Ubuntu Linux
when i try to install Net::SSLeay via cpan i get a msg:

I could not find your OpenSSL in `'
Please provide OpenSSL-0.9.6j or
OpenSSL-0.9.7b installation directory (get from
http://www.openssl.org/ if you don't have it; please note that
SSLeay is no longer supported, see README) (C-c to abort):

my OpenSSL version is OpenSSL-0.9.7g, the installation dir is /usr/bin/openssl

when i enter '/usr/bin/openssl' here i again get
I could not find your OpenSSL in `/usr/bin/openssl' Please provide OpenSSL-0.9.6j or
OpenSSL-0.9.7b installation directory (get from
http://www.openssl.org/ if you don't have it; please note that
SSLeay is no longer supported, see README) (C-c to abort):

--how can i get past this and install this module? i know SSLeay is no longer supported, but i need it to run the latest version of this app...

Replies are listed 'Best First'.
Re: Installing Net::SSLeay on Linux
by PodMaster (Abbot) on Mar 07, 2006 at 19:39 UTC
    --how can i get past this and install this module?
    Install openssl? Pass the correct path to your openssl installation directory?

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.

      my openssl is installed

      openssl version
      OpenSSL 0.9.7g 11 Apr 2005

      which openssl
      /usr/bin/openssl
      --when i pass this to cpan i still get the same error above. i've also tried passing '/usr/bin' to cpan. same error.

      i've also tried installing the development environment libssl-dev. it did not make a different and i still get the same error

        Examine Makefile.PL, you'll see this
        # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. my %configParams = ( NAME => 'Net::SSLeay', VERSION_FROM => 'SSLeay.pm', # finds $VERSION DIR => [ 'Net-SSLeay-Handle-0.50' ], DEFINE => '-DPERL5 -DOPENSSL_NO_KRB5', # perl-5.8/gcc-3.2 n +eeds first, RH9 latter DISTNAME => 'Net_SSLeay.pm', dist => { COMPRESS => 'gzip', SUFFIX => 'gz', }, LIBS => ["-L$openssl_path -L$openssl_path/lib -L$openssl_path/o +ut32dll $libs"], INC => "-I$openssl_path/include -I$openssl_path/inc32 -I/usr/k +erberos/include", OPTIMIZE => $optimize, # Uncomment (and edit) following for debugging with gdb # LIBS => ['-L/usr/src/openssl-0.9.3a -lssl -lcrypto'], # INC => '-I/usr/src/openssl-0.9.3a/include', # OPTIMIZE => '-g', %more_params, ); WriteMakefile(%configParams); # See lib/ExtUtils/MakeMaker.pm for details of how to influence # the contents of the Makefile that is written. #WriteMakefile( # 'NAME' => 'Net::SSLeay::Handle', # 'VERSION_FROM' => 'Handle.pm', # finds $VERSION #);
        You want to focus on INC/LIBS,
        LIBS => ["-L$openssl_path -L$openssl_path/lib -L$openssl_path/o +ut32dll $libs"], INC => "-I$openssl_path/include -I$openssl_path/inc32 -I/usr/k +erberos/include",
        $openssl_path is the path you're supposed to pass, and its supposed to contain $libs
        $libs = $rsaref ? "-lssl -lcrypto -lRSAglue -lrsaref" : "-lssl -lcrypt +o";
        What this means is that "ssl.$Config{dlext}", "crypto.$Config{dlext}" (%Config from use Config;) are supposed to be located somewher in $openssl_path, $openssl_path/lib, $openssl_path/out32dll, because thats where the compiler/linker are going to look (perl -V:cc -V:ld).

        Feel free to edit the Makefile.PL LIBS/INC entries appropriately.

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.

Re: Installing Net::SSLeay on Linux
by syphilis (Archbishop) on Mar 08, 2006 at 02:00 UTC
    Here is the relevant section of the Makefile.PL that generates the error:
    while (1) { $exe_path = "$openssl_path/bin/openssl"; last if -x $exe_path; $exe_path = "$openssl_path/bin/openssl.exe"; last if -x $exe_path; $exe_path = "$openssl_path/sbin/openssl"; last if -x $exe_path; $exe_path = "$openssl_path/out32dll/openssl.exe"; last if -x $exe_path; print "I could not find your OpenSSL in `$openssl_path'\n"; print "Please provide OpenSSL-$openssl_vers or\n" . "OpenSSL-$openssl_vers2 installation directory (get from\n" ." http://www.openssl.org/ if you don't have it; please note that\ +n" ." SSLeay is no longer supported, see README) (C-c to abort):\ +n"; $openssl_path = <STDIN>; chomp $openssl_path; }
    If the openssl executable is in /usr/bin, then the path you need to pass to the Makefile.PL is simply '/usr' - not '/usr/bin/openssl' or '/usr/bin'.

    If, on the other hand, the openssl executable is located in '/usr/bin/openssl/bin', then passing '/usr/bin/openssl' is correct. In that case the failure could be that the '-x' condition (being tested in the Makefile.PL) is not being satisified and you should try to work out why that failure occurs.

    If you still can't get anywhere with this could you tell us the name of the openssl executable, and its location. (I gather from your post that '/usr/bin' is the location, and that the name of the executable file is 'openssl' - but I'm not completely certain that I've got that right :-)

    Cheers,
    Rob

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://535000]
Approved by xorl
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (5)
As of 2024-04-26 09:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found