开发者

WWW::Mechanize->get giving error (HTTPS not supported)

I am trying to use WWW::Mechanize to login to Yahoo. However, when I try to get the login page, it gives the error

Error GETing https://login.yahoo.com/config/login_verify2?&.src=ym: Protocol scheme 'https' is not supported (LWP::Protocol::https not installed)

I installed Crypt::SSLeay, which, I thought, was supposed to take care of HTTPS requests. Why would it be giving this error?

I even say "use Crypt::SSLeay" at the start of the script, and it doesn't give an error regarding its being not installed.

Would going to the YA! page first (http) and then "clicking" "Sign in" (https) link help?

Any help or advice would be ap开发者_C百科preciated.

EDIT: I attempted to install LWP::Protocol:https, but it failed.

EDIT AGAIN: Installing Crypt::SSLeay with tests results in the same failure. -_-

EDIT 3RD TIME: Thanks for helping me, guys. Sorry for the late reply. This is Redhat 9, and the whole installation is screwed up pretty badly.

My original goal was to just install WWW::Mechanize to be able to login to Yahoo. The sysadmin (our teacher) had perl 5.8.7 installed which caused the isntallation to fail---due to LWP::UserAgent's inability to upgrade itself on versions under 5.8.8.

Then I installed Perl 5.10.1 in my home directory using App::perlbrew, and I succesfully installed Mech. However, that created a lot of compatibility issues with using older modules I installed (using 5.8.7). Now I am not sure how to uninstall everything, and I only have maybe 15 megs of disk space left.

OpenSSL was already on the system, but I installed another OpenSSL this morning in my home directory by downloading the tarball from a mirror and compiling it. Apparently it seemed to be the newest version.

One thing is killing me. I don't have root permissions to do anything. This project is due on Friday, so I'm thinking I'll scrap this and do something that doesn't involve HTTPS at all.

I read that I need to just do a yum install of openssl-devel, but I can't do that without root permissions. If anyone knows how to do it please let me know.

I'll try your advice of doing a force install of Net::SSLeay and let you know later.

Now I tried to install Mech in some other directory (away from the 5.8.7 stuff), and it failed... ugh...

4TH EDIT: I installed Net::SSLeay forcefully. Here's the log: It doesn't work. You are right about the SSL libraries.

5TH EDIT: YAAAAAAAAAAAAAAAAAYYY! The teacher installed the openssl-devel, and now it works!!!!!!!!


WWW::Mechanize uses LWP::UserAgent under the hood (as a base class) to get urls. From the docs for that, I see that you need to install LWP::Protocol::https to support https urls.


Details of installation depend on your platform. You basically need:

1) OpenSSL library 2) Net::SSLeay Perl binding module

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜