1
votes

I get an issue when setting up PhantomJS on Ubuntu 14.04, I used NPM to install it but it doesn't work and the installation is stopped at "70%"...

Command : sudo npm install phantomjs --save

> [email protected] install /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs
> node install.js

Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
Saving to /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Receiving...
  [============================------------] 70% 0.0s
Received 12854K total.
Extracting tar contents (via spawned process)
Removing /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/lib/phantom
Copying extracted folder /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2-extract-1435657830806/phantomjs-1.9.8-linux-x86_64 -> /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /var/www/gestiaweb/GestionDettes.3000/node_modules/phantomjs/lib/phantom/bin/phantomjs
[email protected] node_modules/phantomjs
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected])
├── [email protected]
├── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
└── [email protected] ([email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected])
icecom@web-test:/var/www/gestiaweb/GestionDettes.3000$
1
Looks like it installed fine to me, the percentage could be incorrect if it is downloading in chunks. Have you tried running it? - Ben Fortune
Yes it doesn't work when running it, html-pdf don't create any PDF. html-pdf install himself phantomjs... - tonymx227

1 Answers

3
votes

Put the executable into a directory that is in PATH (or put a symlink into PATH) or let NPM install it globally:

npm -g install phantomjs