Installing PhantomJS on the Raspberry Pi

First lets make sure you are in your home directory.

cd ~

then…

git clone https://github.com/piksel/phantomjs-raspberrypi.git

It’s a big binary. She’ll be busy for a bit.

Now we’ll want to apply permissions to run it

chmod -x ~/phantomjs-raspberrypi/bin/phantomjs

also…

chmod 775 ~/phantomjs-raspberrypi/bin/phantomjs

Now symlink it your bin directory.

sudo ln -s /home/pi/phantomjs-raspberrypi/bin/phantomjs /usr/bin/

Now you can use the ‘phantomjs’ command!

GitHub Repo https://github.com/piksel/phantomjs-raspberrypi/blob/master/bin/phantomjs