Install PhantomJS on Debian 9

Latest PhantomJS repository located at

Required Package

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
sudo apt-get install libfreetype6 libfreetype6-dev
sudo apt-get install libfontconfig1 libfontconfig1-dev

If already installed:

cd /opt/
mkdir /opt/phantomjs
cd /opt/phantomjs
tar xvjf phantomjs-2.1.1-linux-x86_64.tar.bz2

Now set extracted package and set in Environment so we can execute phantomJS from all users

mv phantomjs-2.1.1-linux-x86_64 /usr/local/share/
ln -sf /usr/local/share/phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/

Remove temp dir and check if already installed

cd /opt/
rm -rf /opt/phantomjs
phantomjs --version

It should show:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.