Here's how to install CasperJS on Debian LInux. It may even work on Ubuntu, but I'm not sure.
Instructions here are adapted from those found here.
During this process, you will install prerequisites which include PhantomJS, NodeJS, and npm.
- Install PhantomJS using this easy method.
- Run apt-get install curl to install the curl program.
- Run curl -sL deb.nodesource.com/setup | bash - to download a script which will allow you to install nodejs and npm using apt-get install.
- Run apt-get install nodejs to install nodejs and npm.
- Finally, install CasperJS by running npm install -g casperjs
Upon completion of these instructions, you will have installed PhantomJS, curl, nodejs, npm, and of course, CasperJS.