0

I'm trying to use phantomjs on OSX and doesn't work using two approaches:

  1. Using the file downloaded from http://phantomjs.org/download.html on the Downloads folder and unzipping it...When running the app that needs phantomjs I get the error:

java.io.IOException: Cannot run program "phantomjs": error=2, No such file or directory

  1. I installed phantomjs and executed, based on this thread:

sudo ln -s /path/to/phantomjs /usr/local/bin/

but it is already installed:

ln: /usr/local/bin//phantomjs: File exists

How can I make this work?

Thank you very much!!!!

Community
  • 1
  • 1
jhugo
  • 181
  • 2
  • 12
  • Where did you have `phantomjs`? What is the result of `ls -lt /usr/local/bin/phantomjs`? – Elliott Frisch Jul 10 '14 at 01:49
  • Thanks for the answer....The result is: **lrwxr-xr-x 1 root wheel 52 Jun 23 21:16 /usr/local/bin/phantomjs -> /Applications/phantomjs.app/Contents/MacOS/phantomjs** – jhugo Jul 10 '14 at 01:56
  • And the result of `head -n 1 /Applications/phantomjs.app/Contents/MacOS/phantomjs`? – Elliott Frisch Jul 10 '14 at 01:58
  • results: **head: /Applications/phantomjs.app/Contents/MacOS/phantomjs: No such file or directory** – jhugo Jul 10 '14 at 01:59
  • Then you don't have `phantomjs` there. Looking at your linked thread, you seem to be missing `bin` somewhere. – Elliott Frisch Jul 10 '14 at 01:59
  • Sorry for this but...how do I install it there? – jhugo Jul 10 '14 at 02:04
  • Generally, drag the phantomjs.app to your Applications folder. – Elliott Frisch Jul 10 '14 at 02:05
  • I cannot find the phantomjs.app file to drag...I've tried everything...the last thing I tried was **git clone git://github.com/ariya/phantomjs.git cd phantomjs git checkout 1.9 ./build.sh** I'm kinda lost here...got that from [here](http://phantomjs.org/build.html) – jhugo Jul 10 '14 at 04:19
  • Per [here](http://ariya.ofilabs.com/2012/02/phantomjs-and-mac-os-x.html), This is the fastest and easiest way. Go to the download page, find the ZIP file for Mac OS X, then download it. – Elliott Frisch Jul 10 '14 at 04:37
  • I download it and unzip it in the "download" folder of my mac as the instructions say and nothing happens...still doesn't work...sorry for bother so much with – jhugo Jul 12 '14 at 05:14
  • The Mac version? Did you get an app file? if not, you didn't get the correct zip file. – Elliott Frisch Jul 12 '14 at 05:16
  • version 10.7.3...apparently there is no .app file...I have the bin folder with phantomjs inside (is this .app?), examples folder and a few licence files – jhugo Jul 12 '14 at 05:23
  • Hi....can you help me out anymore here? Or no more ideas? Thanks!! – jhugo Sep 24 '14 at 21:24

0 Answers0