Special_K has asked for the wisdom of the Perl Monks concerning the following question:
Hello,
I just installed WWW::Mechanize::PhantomJS and am trying to run the first sample program I found here:
http://search.cpan.org/~corion/WWW-Mechanize-PhantomJS-0.08/lib/WWW/Mechanize/PhantomJS.pm
Here is the actual code:
#!/usr/bin/perl -w use strict; use WWW::Mechanize::PhantomJS; my $mech = WWW::Mechanize::PhantomJS->new(); $mech->get('http://google.com'); $mech->eval_in_page('alert("Hello PhantomJS")'); my $png= $mech->content_as_png();
When I try to run it I get the following error:
./phantomjs_test.pl Can't exec "phantomjs": No such file or directory at /usr/lib/perl5/si +te_perl/5.14/WWW/Mechanize/PhantomJS.pm line 131. Couldn't launch [| phantomjs /usr/lib/perl5/site_perl/5.14/WWW/Mechani +ze/PhantomJS/ghostdriver/main.js --port=8910 --logLevel=OFF]: No such + file or directory / 0 at /usr/lib/perl5/site_perl/5.14/WWW/Mechanize +/PhantomJS.pm line 131.
FWIW, line 131 of PhantomJS.pm is as follows:
$options{ pid } = open my $fh, $cmd
and $cmd is:
my $cmd= "| $options{ launch_exe } $options{ launch_ghostdir } @{ $opt +ions{ launch_arg } }";
Does anyone know what the problem could be?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW::Mechanize::PhantomJS - can't exec "phantomjs"
by NetWallah (Canon) on Sep 13, 2014 at 05:55 UTC | |
by Special_K (Pilgrim) on Sep 13, 2014 at 06:11 UTC | |
by Anonymous Monk on Sep 13, 2014 at 07:00 UTC | |
by Special_K (Pilgrim) on Sep 13, 2014 at 17:10 UTC | |
by NetWallah (Canon) on Sep 13, 2014 at 23:47 UTC | |
| |
|
Re: WWW::Mechanize::PhantomJS - can't exec "phantomjs"
by Special_K (Pilgrim) on Sep 19, 2014 at 04:34 UTC |