Sharp: node-gyp rebuild fails

Created on 19 Jul 2016  路  7Comments  路  Source: lovell/sharp

When doing:
npm install sharp
I get:
npm ERR! Failed at the [email protected] install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the sharp package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild

This is on openSUSE 13.2

question

Most helpful comment

That was the problem. Maybe good to mention at http://sharp.dimens.io/en/stable/install/? npm is nodejs package manager, but because I was installing something for Clojure I did not think about that.

By the way: it is nodejs-devel. ;-)

All 7 comments

Please can you provide more of the error log.

That was fast. :-D

7074 verbose about to build /home/cecil/node_modules/sharp
7075 info build /home/cecil/node_modules/sharp
7076 info linkStuff [email protected]
7077 silly linkStuff [email protected] has /home/cecil/node_modules as its parent node_modules
7078 verbose linkBins [email protected]
7079 verbose linkMans [email protected]
7080 verbose rebuildBundles [email protected]
7081 verbose rebuildBundles [ '.bin', 'bluebird', 'color', 'nan', 'request', 'semver', 'tar' ]
7082 info install [email protected]
7083 verbose unsafe-perm in lifecycle true
7084 info [email protected] Failed to exec install script
7085 verbose unlock done using /home/cecil/.npm/_locks/sharp-21ec4f5a81f17b9e.lock for /home/cecil/node_modules/sharp
7086 verbose stack Error: [email protected] install: node-gyp rebuild
7086 verbose stack Exit status 1
7086 verbose stack at EventEmitter. (/usr/lib64/node_modules/npm/lib/utils/lifecycle.js:217:16)
7086 verbose stack at emitTwo (events.js:87:13)
7086 verbose stack at EventEmitter.emit (events.js:172:7)
7086 verbose stack at ChildProcess. (/usr/lib64/node_modules/npm/lib/utils/spawn.js:24:14)
7086 verbose stack at emitTwo (events.js:87:13)
7086 verbose stack at ChildProcess.emit (events.js:172:7)
7086 verbose stack at maybeClose (internal/child_process.js:827:16)
7086 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)
7087 verbose pkgid [email protected]
7088 verbose cwd /home/cecil
7089 error Linux 4.1.12-1-default
7090 error argv "/usr/bin/node" "/usr/bin/npm" "install" "sharp"
7091 error node v4.4.5
7092 error npm v2.15.5
7093 error code ELIFECYCLE
7094 error [email protected] install: node-gyp rebuild
7094 error Exit status 1
7095 error Failed at the [email protected] install script 'node-gyp rebuild'.
7095 error This is most likely a problem with the sharp package,
7095 error not with npm itself.
7095 error Tell the author that this fails on your system:
7095 error node-gyp rebuild
7095 error You can get information on how to open an issue for this project with:
7095 error npm bugs sharp
7095 error Or if that isn't available, you can get their info via:
7095 error
7095 error npm owner ls sharp
7095 error There is likely additional logging output above.

Is node-devel installed? Might be some hints in the set-up script for the (Docker-based) OpenSUSE packaging tests at https://github.com/lovell/sharp/blob/master/packaging/test/opensuse.sh

That was the problem. Maybe good to mention at http://sharp.dimens.io/en/stable/install/? npm is nodejs package manager, but because I was installing something for Clojure I did not think about that.

By the way: it is nodejs-devel. ;-)

@Westerhof, I am facing the same problem, cannot install sharp in a CentOS.
Could you help to tell me how to solve the problem?
I have npm installed, not sure if this is the nodejs-devel you mentioned.
Thanks

No, npm is the node.js package manager. You probably need to do:
yum install nodejs-devel

On a mac and getting the same error

Was this page helpful?
0 / 5 - 0 ratings

Related issues

paulieo10 picture paulieo10  路  3Comments

jaekunchoi picture jaekunchoi  路  3Comments

tomercagan picture tomercagan  路  3Comments

iq-dot picture iq-dot  路  3Comments

henbenla picture henbenla  路  3Comments