Ok, I'll start with the solution, for compilation there is a version of phantomjs-linux-armv6l here , on pi, run the following commands:
$ cd /tmp $ wget https://github.com/aeberhardo/phantomjs-linux-armv6l/archive/master.zip $ unzip master.zip $ cd phantomjs-linux-armv6l-master $ bunzip2 *.bz2 && tar xf *.tar
I added:
sudo cp phantomjs-1.9.0-linux-armv6l/bin/phantomjs /usr/bin
So phantomjs will be on your way.
pi@raspberrypi ~ $ phantomjs --version 1.9.0 pi@raspberrypi ~ $ phantomjs phantomjs>
Now we have this, time for testing:
pi@raspberrypi ~ $ cat test.py
From faq . Starting with PhantomJS 1.5, it is completely headless and there is no need to run X11 / Xvfb anymore.
I tried using xvfb-run and exported the display using the shell script in init.d to run xvfb, I got a little more opportunity to run iceweasel from bash without a head without any problems, but still not cigars when it came to phantoms and selenium. I think this can lead to incompatibilities between selenium and the phantomjs version, regardless of whether it has 1.9.0, and real mute viewing is much more desirable.
I was in the middle of creating a toolchain and was going to try to compile myself when I found the link above, for anyone interested in cross-compiling, crosstools-ng makes life easier.
I run arm6, there is also a compiled version for arm7 using 2.0.0, dependencies:
sudo apt-get install flex bison gperf ruby perl libsqlite3-dev libfontconfig1-dev libicu-dev libfreetype6 libssl-dev libpng-dev libjpeg-dev python libX11-dev libxext-dev
Installation procedure, I extracted the binary code to Dropbox:
wget https://www.dropbox.com/s/epj1rji9d239dco/phantomjs chmod +x phantomjs sudo cp phantomjs /usr/bin
Source link github phantomjs-2.0.0-armv7