Skip to content

Instantly share code, notes, and snippets.

@mickaelandrieu
Last active May 3, 2023 21:40
Show Gist options
  • Star 13 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save mickaelandrieu/6312683 to your computer and use it in GitHub Desktop.
Save mickaelandrieu/6312683 to your computer and use it in GitHub Desktop.
Install phantomjs/casperjs on GNU/Linux
#!/bin/bash
# `` sudo sh install.sh ``
# Developement environnement
# Important: use 'i686' instead of 'x86_64'
#
# For stable environnement see also : https://gist.github.com/mickaelandrieu/6312724
echo Installation de Phantomjs
cd /usr/local/share
sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2
sudo tar -xvf phantomjs-1.9.2-linux-x86_64.tar.bz2
sudo mv phantomjs-1.9.2-linux-x86_64 phantomjs-1.9.2
sudo ln -s /usr/local/share/phantomjs-1.9.2/ /usr/local/share/phantomjs
sudo ln -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
echo Installation de Casperjs
cd /usr/local/share
sudo git clone -b master git://github.com/n1k0/casperjs.git
cd casperjs
sudo ln -sf `pwd`/bin/casperjs /usr/local/bin/casperjs
echo Version de Phantomjs
phantomjs --version
echo Version de Casperjs
casperjs --version
@ArockiaAntony
Copy link

Thanks a lot. It saved my time Micheal.

@adadgio
Copy link

adadgio commented Nov 9, 2015

Awesome. It saved my time as well ! Thanks a lot.

@baskap
Copy link

baskap commented Nov 11, 2015

Nice :)

@grench
Copy link

grench commented Dec 1, 2015

Thanks!)

@sonvisal
Copy link

sonvisal commented Jan 5, 2016

thanks

@blueyes20
Copy link

great!! oleeeee from Spain! ;)

@rdelville
Copy link

Nickel. Merci

@jansenicus
Copy link

Terima kasih. Thank you from Indonesia.

I usually use PyVirtualDisplay in Linux but is not working under Windows.

But now. I need to try using phantomjs and casperjs for running my python script in background under Microsoft Windows.

@tavinus
Copy link

tavinus commented Dec 6, 2016

Ok, as of Dec 5th, 2016 I had to change the phantomjs link for it to work. It is in line 10. All elese goes fine (if we use the same version).
Old line 10: sudo wget https://phantomjs.googlecode.com/files/phantomjs-1.9.2-linux-x86_64.tar.bz2
New line 10: sudo wget https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/phantomjs/phantomjs-1.9.2-linux-x86_64.tar.bz2

PS: I also tried using phantomjs v2.11 but that failed on my Debian Wheezy (w/ Kernel 3.16). It gives a file not found error (when trying to run phantomjs), seems to be arch-related or some missing dependencies. Didn't have the time to investigate more.

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