PaspbianでRubyのCapybaraを使いたかった。
自分でビルドすると数日かかる人もいるそうで、ビルドすると下記のような警告が出る。
~/phantomjs $ ./build.py
----------------------------------------
WARNING
----------------------------------------
Building PhantomJS from source takes a very long time, anywhere from 30 minutes
to several hours (depending on the machine configuration). It is recommended to
use the premade binary packages on supported operating systems.
For details, please go the the web site: http://phantomjs.org/download.html.
Do you want to continue (Y/n)? n
なのでビルド済みのものを導入する。
配布元
phantomjs-on-raspberry/rpi-2-3/wheezy-jessie/v2.1.1 at master · fg2it/phantomjs-on-raspberry
手順
sudo apt-get install libfontconfig1 libfreetype6 libpng12-0
curl -o /tmp/phantomjs -sSL https://github.com/fg2it/phantomjs-on-raspberry/releases/download/v2.1.1-wheezy-jessie/phantomjs
sudo mv /tmp/phantomjs /usr/local/bin/phantomjs
sudo chmod a+x /usr/local/bin/phantomjs
動いた
$ phantomjs --version
2.1.1