Recently I needed to install CasperJS. It’s a testing utility written in JavaScript on top of PhantomJS so I needed to install “the phantom” first but I noticed that installing it from source would take a long time. I decided to download and install the ready-made binary package. Below are few steps that may help you install CasperJS faster. Note that the OS I’m using is Ubuntu 12.10.
Before you start, make sure you have git installed:
Step 1: Installing PhantomJS
– Download the latest source
– Extract the archive
– Move the extracted folder to a proper location:
– Create a symbolic link so we can just type “phantomjs” when we want to use “the phantom”
– Check if it’s working
If you see the current PhantomJS version you can proceed with installing CasperJS.
Step 2: Installing CasperJS
– Enter a proper location to avoid moving the extracted files:
– Get the source from the official git repository:
– Create symbolic link
– Check if it’s working
Voilla, you have successfully installed CasperJS!
Thanks :). This works for Ubuntu 13.04 too (versions have changed slightly). It’s much better than doing a sudo apt-get install phantomjs, as that will only install version 1.6. Using your method, the version of phantomjs installed is 1.9.1.
Thanks for manual. Works on Ubuntu 14.04 🙂
You, sir, are a dude. Just been getting all in a muddle with symlinks on 12.04 and found this nugget 🙂
Please note that now the latest version is phantomjs-1.9.8-linux-i686.tar.bz2 on 32 bits.
Reblogged this on A Web Developer From Beijing.
Hi, i had this problem:
/usr/local/lib/node_modules/phantomjs/lib/phantom/bin/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
And resolved with this command:
sudo apt-get install libfontconfig
For the ones who get stucked.
Great help Anton!