Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fluidum/1436dbca5bef355863f87fb69dafb547 to your computer and use it in GitHub Desktop.
Save fluidum/1436dbca5bef355863f87fb69dafb547 to your computer and use it in GitHub Desktop.
Simple tutorial for installing casperjs on ubuntu

Install PhantomJS

Oficial installation documentation.

Prerequisites: PhantomJS dependencies

sudo apt-get install fontconfig

Installation

cd /usr/local/share
wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
sudo tar xjf phantomjs-2.1.1-linux-x86_64.tar.bz2
sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/share/phantomjs; sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs; sudo ln -s /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/bin/phantomjs

Remove tar file of PhantomJS

rm phantomjs-2.1.1-linux-x86_64.tar.bz2

Install CasperJS

Full installation options

npm installation

mkdir ~/new-casperjs
cd ~/new-casperjs
npm install casperjs

Self test CasperJS

node_modules/casperjs/bin/casperjs selftest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment