Last active
May 3, 2023 21:40
-
-
Save mickaelandrieu/6312683 to your computer and use it in GitHub Desktop.
Install phantomjs/casperjs on GNU/Linux
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
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
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.