in reply to Re: Protocol scheme 'http' is not supported
in thread Protocol scheme 'http' is not supported
Thanks for the reply. Unfortunately I get the same results...
$ perl -e 'use WWW::Mechanize; my $mech = WWW::Mechanize->new; my $hro= $mech->get(q{http://www.perlmonks.com/}); print $hro->content'
Error GETing http://www.perlmonks.com/: Protocol scheme 'http' is not supported at -e line 1.
However, oddly enough if I do the same command with sudo I get the following:
$ sudo perl -e 'use WWW::Mechanize; my $mech = WWW::Mechanize->new; my $hro= $mech->get(q{http://www.perlmonks.com/}); print $hro->content'
HTML::Parser object version 3.69 does not match bootstrap parameter 3.55 at /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/XSLoader.pm line 94.
Compilation failed in require at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/HTML/Entities.pm line 152.
Compilation failed in require at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/HTML/TokeParser.pm line 9.
BEGIN failed--compilation aborted at /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi/HTML/TokeParser.pm line 9.
Compilation failed in require at /usr/lib/perl5/site_perl/5.8.8/WWW/Mechanize.pm line 134.
BEGIN failed--compilation aborted at /usr/lib/perl5/site_perl/5.8.8/WWW/Mechanize.pm line 134.
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.
So I checked HTML::Parser and the rest and found:
$ sudo perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.9800) Ente +r 'h' for help. cpan[1]> install HTML::Parser HTML::Parser is up to date (3.69). cpan[2]> install XSLoader XSLoader is up to date (0.15). cpan[3]> install HTML::Entities HTML::Entities is up to date (3.69). cpan[4]> install HTML::TokeParser HTML::TokeParser is up to date (3.69). cpan[5]> install WWW::Mechanize WWW::Mechanize is up to date (1.72).
And then looking at my @INC and doing some find'ing I'm seeing:
$ perl -e 'print join("\n",@INC);' /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 . $ $ $ sudo find /usr -name Mechanize.pm -exec ls -l {} \; -rwxr-xr-x 1 root root 79472 Feb 2 16:38 /usr/lib/perl5/site_perl/5.8 +.8/WWW/Mechanize.pm $ $ $ sudo find /usr -name Parser.pm -exec ls -l {} \; -r--r--r-- 1 root root 39789 Oct 15 2011 /usr/lib64/perl5/site_perl/5 +.8.8/x86_64-linux-thread-multi/HTML/Parser.pm -rw-r--r-- 1 root root 39509 Jul 10 2006 /usr/lib64/perl5/vendor_perl +/5.8.8/x86_64-linux-thread-multi/HTML/Parser.pm -rw-r--r-- 1 root root 27103 Aug 18 2003 /usr/lib64/perl5/vendor_perl +/5.8.8/x86_64-linux-thread-multi/XML/Parser.pm -rw-r--r-- 1 root root 64063 Dec 16 2011 /usr/lib/perl5/5.8.8/Pod/Par +ser.pm -r--r--r-- 1 root root 51259 Feb 20 2011 /usr/lib/perl5/5.8.8/TAP/Par +ser.pm $ $ $ sudo find /usr -name TokeParser.pm -exec ls -l {} \; -r--r--r-- 1 root root 10104 Oct 15 2011 /usr/lib64/perl5/site_perl/5 +.8.8/x86_64-linux-thread-multi/HTML/TokeParser.pm -rw-r--r-- 1 root root 10134 Apr 26 2006 /usr/lib64/perl5/vendor_perl +/5.8.8/x86_64-linux-thread-multi/HTML/TokeParser.pm $
Does any of that give a clue as to what's going on here...?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Protocol scheme 'http' is not supported
by kcott (Archbishop) on Jul 28, 2012 at 17:04 UTC | |
by Anonymous Monk on Jul 29, 2012 at 11:59 UTC | |
by Bejjan (Novice) on Jul 30, 2012 at 07:03 UTC | |
by ggerke (Novice) on Jul 30, 2012 at 16:54 UTC |