# jessie-backportsレポジトリの設定後から
#
pi@raspberrypi:~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie
pi@raspberrypi:~ $ sudo apt install -t jessie-backports phantomjs -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libqt5qml5 libqt5quick5 libqt5sql5 libqt5sql5-sqlite libqt5webkit5
The following NEW packages will be installed:
libqt5qml5 libqt5quick5 libqt5sql5 libqt5sql5-sqlite libqt5webkit5 phantomjs
0 upgraded, 6 newly installed, 0 to remove and 224 not upgraded.
Need to get 8,579 kB/9,844 kB of archives.
After this operation, 39.0 MB of additional disk space will be used.
.
.
.
Setting up libqt5webkit5:armhf (5.3.2+dfsg-4+rpi1) ...
Setting up phantomjs (2.1.1+dfsg-2~bpo8+1) ...
Processing triggers for libc-bin (2.19-18+deb8u10) ...
pi@raspberrypi:~ $
pi@raspberrypi:~ $ phantomjs --version
2.1.1
pi@raspberrypi:~ $
質問が完結しているのにも関わらず、申し訳ございません。
$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 9.1 (stretch)
Release: 9.1
Codename: stretch
の後に以下のように打つと
phantomjs --version
QXcbConnection: Could not connect to display
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
中止
と表示されたということはPhantomJSはインストールできていないということでしょうか。
harunoutaさん、
RaspberryPiのデスクトップ(GUI)環境で、ターミナル(lxterminalなど)を開いて、実行していますかか?
どういった環境で実行しているか、質問されるときには入れたほうがいいと思います。(例: Windows から、TeraTerm を使って、ssh で接続。)
確認できてませんが、エラーメッセージでぐぐってみたところ、githubのissueで、[QXcbConnection: Could not connect to display #14376](https://github.com/ariya/phantomjs/issues/14376)
のとこで、`export QT_QPA_PLATFORM=offscreen` を実行すると、動作したという方もいるようです。
退会済みユーザー
2017/12/13 03:32
退会済みユーザー
2017/12/13 05:53
2017/12/13 07:10
退会済みユーザー
2017/12/14 07:47
2017/12/14 08:10
退会済みユーザー
2017/12/14 08:25
退会済みユーザー
2017/12/15 02:58
2017/12/15 05:17
退会済みユーザー
2017/12/21 02:14