Skip to content

Instantly share code, notes, and snippets.

@rbshadow
Created May 22, 2020 10:13
Show Gist options
  • Save rbshadow/837d34b7f630f299b9580f006fcf8e43 to your computer and use it in GitHub Desktop.
Save rbshadow/837d34b7f630f299b9580f006fcf8e43 to your computer and use it in GitHub Desktop.
#!/bin/bash
sudo apt install -y build-essential chrpath libssl-dev libxft-dev libfreetype6 libfreetype6-dev libfontconfig1 libfontconfig1-dev
phantomjs=$(echo $(curl -s -k https://bitbucket.org/ariya/phantomjs/downloads/ | grep "phantomjs" | grep -oP "phantomjs\-(\d+).(\d+).(\d+)\-linux\-x86_64.tar.bz2?") | cut -d' ' -f1)
wget --no-check-certificate -P $HOME/Desktop/Valluk https://bitbucket.org/ariya/phantomjs/downloads/$phantomjs
sudo tar xvjf $phantomjs
sudo rm $phantomjs
sudo mv phantomjs* /usr/local/share
sudo ln -sf /usr/local/share/phantomjs*/bin/phantomjs /usr/local/bin
touch /tmp/openssl.cnf
export OPENSSL_CONF="/tmp/openssl.cnf"
echo phantomjs `phantomjs --version` is successfully installed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment