Medium / phantomjs

NPM wrapper for installing phantomjs
Other
1.43k stars 435 forks source link

Jenkins cannot install phantomjs #615

Closed lfcgomes closed 7 years ago

lfcgomes commented 8 years ago

Hi!

I have a jenkins job that run test suites but the first command that is executed is npm install, but it fails. This is the output

> phantomjs@1.9.18 install /var/jenkins_home/workspace/project - pr/node_modules/egnyte-js-sdk/node_modules/grunt-contrib-jasmine/node_modules/grunt-lib-phantomjs/node_modules/phantomjs
> node install.js
Download already available at /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
Extracting tar contents (via spawned process)
Error extracting archive
Phantom installation failed { [Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now 
]
  killed: false,
  code: 2,
  signal: null,
  cmd: 'tar jxf /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2' } Error: Command failed: tar jxf /tmp/phantomjs/phantomjs-1.9.8-linux-x86_64.tar.bz2
tar (child): bzip2: Cannot exec: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now

at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
npm ERR! Linux 3.19.0-43-generic 
npm ERR! argv "/tmp/node4.4.2/bin/node" "/tmp/node4.4.2/bin/npm" "install"
npm ERR! node v4.4.2
npm ERR! npm  v2.15.0
npm ERR! code ELIFECYCLE
npm ERR! phantomjs@1.9.18 install: `node install.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the phantomjs@1.9.18 install script 'node install.js'.
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 information on how to open an issue for this project with:
npm ERR!     npm bugs phantomjs
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! 
npm ERR!     npm owner ls phantomjs
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /var/jenkins_home/workspace/project - pr/npm-debug.log
Build step 'Execute shell' marked build as failure`

Any suggestions? Thanks for your help!

Desperado commented 7 years ago

the same trouble, happens from yesterday.

> fibers@1.0.14 install /root/cc_e2e/node_modules/chimp/node_modules/xolvio-sync-webdriverio/node_modules/fibers
> node build.js || nodejs build.js

`linux-x64-v8-4.5` exists; testing
Binary is fine; exiting

> phantomjs2@2.2.0 install /root/cc_e2e/node_modules/chimp/node_modules/phantomjs2
> node install.js

PhantomJS not found on PATH
Downloading https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Saving to /root/cc_e2e/node_modules/chimp/node_modules/phantomjs2/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Receiving...
-
Error requesting archive.
Status: 403
Request options: {
  "uri": "https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2",
  "encoding": null,
  "followRedirect": true,
  "headers": {},
  "strictSSL": true
}
Response headers: {
  "x-amz-request-id": "A43840E2A1E39F69",
  "x-amz-id-2": "+oIX4Zc2ZhyRIWsahNDNYvKojIGJ7TgvG2PWIQ+xujJaSs2lCacou8fSY420Qhx+l7Sz2xduBu0=",
  "content-type": "application/xml",
  "transfer-encoding": "chunked",
  "date": "Fri, 09 Sep 2016 13:41:31 GMT",
  "server": "AmazonS3",
  "connection": "close"
}
Make sure your network and proxy settings are correct.

If you continue to have issues, please report this full log at https://github.com/Medium/phantomjs
nicks commented 7 years ago

@lfcgomes you need to install bzip2, see https://github.com/Medium/phantomjs#installation-fails-with-spawn-enoent

@Desperado that's phantomjs2, a different package

rohit-glassbeam commented 7 years ago

I already have bzip2. Still facing the same issue on centos while npm installing.