Building PhantomJS from source

You may also want to build your own binaries by compiling PhantomJS from source. Sources are hosted in the Github server at https://github.com/ariya/phantomjs.

Before you start downloading sources, you will need these tools installed on your workspace:

OS

Required development tools

Windows

Visual Studio 2010 or 2008 (Express edition)

git

Mac OS X

Xcode

git

Ubuntu/RHEL/CentOS Linux

gcc

gcc-c++

make

git

openssl-devel

freetype-devel

fontconfig-devel

The PhantomJS team is always trying to find the optimal way to build the sources, and the build instructions are frequently modified. To build PhantomJS properly, you must follow the steps found here: http://phantomjs.org/build.html.

If you are not planning to hack ...

Get Getting Started with PhantomJS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.