Summary of my problem below:
1. Trying to write a script to log in to Yahoo and download some HTML
2. The script uses WWW::Yahoo::Login module, and I can't get it to work.
3. The error message leads me to believe I'm missing a module. I can't seem to install the missing module for reasons I do not know (regarding openssl or gcc?).
4. (I'm no Linux expert.) I'm running Fedora Core 2 and Perl v5.8.3 built for i386-linux-thread-multi.
Here are the details of my problem:
I am trying to write a script that uses the WWW::Yahoo::Login module. Actually, I installed WWW::Yahoo::Login and WWW::Mechanize from CPAN and then just tried to run the sample script from the WWW::Yahoo::Login module page on CPAN.org as follows:
===============================================
use WWW::Yahoo::Login qw( login logout );
use WWW::Mechanize;
my $mech = WWW::Mechanize->new();
$resp = login(
mech => $mech,
uri => 'http://mail.yahoo.com/',
user => 'a_yahoo_user',
pass => 'asecret',
);
if ($resp) {
print $mech->content;
} else {
warn $WWW::Yahoo::Login::ERROR;
}
# do some things
unless ( logout(mech => $mech) ) {
warn $WWW::Yahoo::Login::ERROR;
}
=============================================================
Below is the error message I get from running the script:
=================================================================
Failed to fetch https://login.yahoo.com/: Protocol scheme 'https' is not supported (Crypt::SSLeay not installed) at test_yahoo_login.pl line 18.
Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/site_perl/5.8.3/WWW/Yahoo/Login.pm line 110.
Failed to fetch : Can't locate object method "new" via package "LWP::Protocol::https::Socket" at test_yahoo_login.pl line 25.
=================================================================
So, for starters, I figured I'd try to install the Crypt::SSLeay module from CPAN, but while trying to install Crypt::SSLeay from CPAN, I encountered this question:
=================================================================
CPAN.pm: Going to build C/CH/CHAMAS/Crypt-SSLeay-0.51.tar.gz
No OpenSSL installation found, usually in /usr/local/openssl
Which OpenSSL build path do you want to link against?
=================================================================
So I typed the following at the command prompt....
$which openssl
...and this was returned:
$/usr/bin/openssl
So when I entered /usr/bin as the "build path" to link against, I get:
==============================================================
CPAN.pm: Going to build C/CH/CHAMAS/Crypt-SSLeay-0.51.tar.gz
No OpenSSL installation found, usually in /usr/local/openssl
Which OpenSSL build path do you want to link against? /usr/bin/
Apparently no SSLeay installation at '/usr/bin/'
Are you sure you got it correct????
================================================
BUILD INFORMATION
================================================
ssl dir: /usr/bin/
libraries: -lssl -lcrypto -lgcc -lRSAglue -lrsaref
include dir: /usr/bin//include
ssl header: ssl.h
ssl candidate: /usr/bin/; /usr/bin//include
================================================
Checking if your kit is complete...
Looks good
Note (probably harmless): No library found for -lgcc
Note (probably harmless): No library found for -lRSAglue
Note (probably harmless): No library found for -lrsaref
Writing Makefile for Crypt::SSLeay
cp lib/Crypt/SSLeay/X509.pm blib/lib/Crypt/SSLeay/X509.pm
cp lib/Net/SSL.pm blib/lib/Net/SSL.pm
cp SSLeay.pm blib/lib/Crypt/SSLeay.pm
cp lib/Crypt/SSLeay/Conn.pm blib/lib/Crypt/SSLeay/Conn.pm
cp lib/Crypt/SSLeay/MainContext.pm
blib/lib/Crypt/SSLeay/MainContext.pm
cp lib/Crypt/SSLeay/CTX.pm blib/lib/Crypt/SSLeay/CTX.pm
cp lib/Crypt/SSLeay/Err.pm blib/lib/Crypt/SSLeay/Err.pm
/usr/bin/perl /usr/lib/perl5/5.8.3/ExtUtils/xsubpp -typemap
/usr/lib/perl5/5.8.3/ExtUtils/typemap -typemap typemap
SSLeay.xs > SSLeay.xsc && mv SSLeay.xsc SSLeay.c
gcc -c -I/usr/bin//include -D_REENTRANT -D_GNU_SOURCE
-DTHREADS_HAVE_PIDS -DDEBUGGING -fno-strict-aliasing
-I/usr/local/include -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm -O2 -g -pipe -march=i386 -mcpu=i686 -DVERSION=\"0.51\"
-DXS_VERSION=\"0.51\" -fPIC
"-I/usr/lib/perl5/5.8.3/i386-linux-thread-multi/CORE" SSLeay.c
/bin/sh: line 1: gcc: command not found
make: *** [SSLeay.o] Error 127
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
=============================================================
Why can't I install Crypt::SSLeay?
Are my problems bigger than just the fact that I can't install Crypt::SSLeay?
At this point I'm stuck. Any help would be greaty appreciated.
Edit by castaway - added sq.bracket html entities and readmore tags
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.