in reply to WWW::Mechanize::PhantomJS - can't exec "phantomjs"

The installation instructions for the perl module WWW::Mechanize::PhantomJS are rather cryptic, but they DO say:
INSTALLING

Install the PhantomJS executable

So - you DO need to download and install it from the PhantomJS download page.

        "You're only given one little spark of madness. You mustn't lose it."         - Robin Williams

  • Comment on Re: WWW::Mechanize::PhantomJS - can't exec "phantomjs"

Replies are listed 'Best First'.
Re^2: WWW::Mechanize::PhantomJS - can't exec "phantomjs"
by Special_K (Pilgrim) on Sep 13, 2014 at 06:11 UTC
    Thanks - I didn't read the page closely enough and assumed cpan would take care of all dependencies. NEW ISSUE: Rather than make a new post, I'll just add this one: After downloading phantomjs.exe and pointing to it in my test program above using this line:
    my $mech = WWW::Mechanize::PhantomJS->new(launch_exe => "/home/user1/p +hantomjs.exe");

    I now receive the following error when I try to run it:


    Can't open '/usr/lib/perl5/site_perl/5.14/WWW/Mechanize/PhantomJS/ghos +tdriver/main.js' Selenium server did not return proper status at (eval 82) line 61.

    Any ideas on this one? The main.js file referenced in the message does exist.

        No, what I am saying is that the file referenced in the error message:
        '/usr/lib/perl5/site_perl/5.14/WWW/Mechanize/PhantomJS/ghos +tdriver/main.js'

        already does exist - it was put there when I installed WWW::Mechanize::PhantomJS. The question is: why is PhantomJS unable to open it?