-
Notifications
You must be signed in to change notification settings - Fork 162
PhantomJS installation
For this reason, ensure to install a version > 2
Linux (Debian, Ubuntu, Kali and distributions providing a native package)
-
apt-get update && apt-get install phantomjs
(replaceapt-get
by your distribution package manager)
-
First, install some dependencies
-
Get the latest phantomjs program. The current version was 2.1.1 at the time of writing this tutorial.
http://phantomjs.org/download.html
https://bitbucket.org/ariya/phantomjs/downloads
-
Download it on your system (choose 32 or 64bits) and untar it wherever you want, let's say
/opt
$ cd /opt
$ wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
$ tar xvf phantomjs-2.1.1-linux-x86_64.tar.bz2
-
Make a symlink to the phantomjs binary in your
/usr/local/bin
directory
$ ln -s /opt/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs
-
Execute the binary with the
-v
option to check that everything works
$ phantomjs -v
2.1.1
-
Get the latest phantomjs program. The current version was 2.1.1 at the time of writing this tutorial.
http://phantomjs.org/download.html
https://bitbucket.org/ariya/phantomjs/downloads
-
Download it on your system and untar it wherever you want, let's say
C:\Program Files\phantomjs-2.1.1-windows
-
Add
C:\Program Files\phantomjs-2.1.1-windows
to the PATH environment variable (user or system, whatever) -
Open a command prompt and execute the binary with the
-v
option to check that everything works
phantomjs -v
2.1.1
webscreenshot
is not tested on macOS but this post explains that phantomjs
can be installed that way:
$ brew tap homebrew/cask
$ brew cask install phantomjs