Philipp Claßen Philipp Claßen - 1 year ago 169
Node.js Question

Cannot install phantomjs -- Is it a bitbucket issue?

phantomjs fails to install. Does the error indicate that bitbucket has a problem?

$ sudo npm install -g phantomjs
> phantomjs@1.9.7-6 install /usr/lib/node_modules/phantomjs
> node install.js

Looks like an `npm install -g`; unable to check for already installed version.
Saving to /usr/lib/node_modules/phantomjs/phantomjs/phantomjs-1.9.7-linux-x86_64.tar.bz2
Error requesting archive.
Status: 403
Request options: {
"protocol": "http:",
"slashes": true,
"auth": null,
"host": "",
"port": null,
"hostname": "",
"hash": null,
"search": null,
"query": null,
"pathname": "/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2",
"path": "/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2",
"href": ""
Response headers: {
"content-type": "application/xml",
"transfer-encoding": "chunked",
"connection": "keep-alive",
"date": "Fri, 23 May 2014 13:29:01 GMT",
"server": "AmazonS3",
"x-cache": "Error from cloudfront",
"via": "1.1 (CloudFront)",
"x-amz-cf-id": "V06j38N_5EE5K5vPU1uj8ADZ7451C7zTZ-rqsn785PFU-6Sxu-KfiQ=="
Make sure your network and proxy settings are correct.
npm ERR! phantomjs@1.9.7-6 install: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the phantomjs@1.9.7-6 install script.
npm ERR! This is most likely a problem with the phantomjs package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node install.js
npm ERR! You can get their info via:
npm ERR! npm owner ls phantomjs
npm ERR! There is likely additional logging output above.

npm ERR! System Linux 3.2.0-61-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "phantomjs"
npm ERR! cwd /home/phil
npm ERR! node -v v0.10.28
npm ERR! npm -v 1.4.10
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/phil/npm-debug.log
npm ERR! not ok code 0

Answer Source

UPDATE: It has been fixed, but you have to upgrade phantomjs


Some background: I ran into the same problem again on MacOS because it did not upgrade all package.json files.

Also note that there are two phantomjs projects:

  1. (the main project)
  2. (NPM wrapper for installing phantomjs)

The fix for the download issues concerns the npm wrapper.

(Here comes my original post)

$ wget
2014-05-23 15:41:41 ERROR 403: Forbidden.

I send an email to the maintainer (as suggested by the npm error message). Now, I think, we just have to sit it out.

Update: github issue: