LoginSignup
3

More than 5 years have passed since last update.

Raspbian(Raspberry Pi 3)にビルドせずにPhantomjsを入れる

Posted at

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

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3