Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Install PhantomJS on MacOs 10.11 El Captian

I can't install phantomJs in my macbook after upgrading to 10.11 (El Capitan).

Whenever I try to install it using homebrew it gives me this error:

$ brew install phantomjs phantomjs: OS X Yosemite or older is required. Error: An unsatisfied requirement failed this build. 
like image 270
jfcorugedo Avatar asked Nov 05 '15 09:11

jfcorugedo


People also ask

How do I use PhantomJS EXE?

Go to the “bin” folder and check phantomjs.exe file. If you are using it on a Windows OS, then you can set the path variable under the environment variable for fast access through command prompt. The command to run the PhantomJS program: C:\> phantomjs [options] file.

What is PhantomJS EXE?

PhantomJS is a discontinued headless browser used for automating web page interaction. PhantomJS provides a JavaScript API enabling automated navigation, screenshots, user behavior and assertions making it a common tool used to run browser-based unit tests in a headless system like a continuous integration environment.


2 Answers

Something is broken since Xcode 7, if you have npm you can install it:

npm install -g phantomjs-prebuilt 

Now that the issue have been handled, you can download it.

like image 88
Thomas Ayoub Avatar answered Sep 18 '22 07:09

Thomas Ayoub


Note that :

npm install -g phantomjs  

Will install v1.9.8

The latest preview version v2.0.1 works correctly on 10.11 El Captian is available as a binary download.

Just copy bin/phantomjs from the download into /usr/local/bin/ (or wherever you want it) on your machine.

like image 44
dwkns Avatar answered Sep 21 '22 07:09

dwkns