#下载树莓派3所需要的phantomjs压缩包
wget https://codeload.github.com/andrewsyc/PhantomJS-Raspberry-Pi-3-/zip/master
#解压
unzip master
#解压得到phantomjs
unzip PhantomJS-Raspberry-Pi-3--master/phantomjs.zip
#将phantomjs 放到本地指定的路径下,以后加载phantomjs都通过该路径
sudo mv phantomjs /usr/local/bin/phantomjs
#删除压缩包和解压目录
rm master
rm -r PhantomJS-Raspberry-Pi-3--master
#检验是否成功配置
phantomjs --version
附带树莓派2配置phantomjs
#从github上下载安装包
sudo wget https://github.com/hamidnazari/raspi-armv7l-phantomjs/raw/master/phantomjs-2.0.0.tar.gz
#解压压缩包
sudo tar zxfv phantomjs-2.0.0.tar.gz
#将phantomjs加入到路径中
sudo mv phantomjs /usr/local/bin/
#删除压缩包
sudo rm phantomjs-2.0.0.tar.gz