Getting the Code
To obtain the code using Git from the official repository github.com/ariya/phantomjs:
git clone git://github.com/ariya/phantomjs.git cd phantomjs git checkout 2.1.1 git submodule init git submodule update
Compile and Link
From the code checkout:
python build.py
This will take some time. Once it is completed, the executable will be available under the bin
subdirectory.
Tip: If the compilation process is interrupted, once started again the build.py
script will continue where left off.