lovell / sharp

High performance Node.js image processing, the fastest module to resize JPEG, PNG, WebP, AVIF and TIFF images. Uses the libvips library.
https://sharp.pixelplumbing.com
Apache License 2.0
29.1k stars 1.29k forks source link

Install failure #451

Closed sabrehagen closed 8 years ago

sabrehagen commented 8 years ago

On Ubuntu 14.04 x64 running node v6.2.0 and npm 3.8.9, npm install sharp yields the following error message:

npm WARN deprecated sharp@0.12.2: CVE-2016-3714 https://github.com/lovell/sharp/issues/424

> sharp@0.12.2 install /home/ubuntu/stemn/node_modules/sharp
> node-gyp rebuild

ERROR: https://dl.bintray.com/lovell/sharp/libvips-8.2.0-lin.tar.gz status code 404
gyp: Call to 'LDD_VERSION="ldd (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper." node -e "require('./binding').download_vips()"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:204:12)
gyp ERR! System Linux 3.13.0-74-generic
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/ubuntu/stemn/node_modules/sharp
gyp ERR! node -v v6.2.0
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok 
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.12
npm WARN stemn@0.0.817 No license field.
npm ERR! Linux 3.13.0-74-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "sharp"
npm ERR! node v6.2.0
npm ERR! npm  v3.8.9
npm ERR! code ELIFECYCLE

npm ERR! sharp@0.12.2 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sharp@0.12.2 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, 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
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs sharp
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls sharp
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/ubuntu/stemn/npm-debug.log
lovell commented 8 years ago
npm WARN deprecated sharp@0.12.2: CVE-2016-3714 https://github.com/lovell/sharp/issues/424

Please see #424

lovell commented 8 years ago

@sabrehagen Were you able to upgrade?

lovell commented 8 years ago

Closing this but please do re-open if there are still problems after upgrading.

sabrehagen commented 7 years ago

Hi @lovell, still experiencing problems after upgrading, almost exactly one year later! :)

I'm trying to install sharp@0.18.1 in this container: https://hub.docker.com/r/sabrehagen/alpine-consul-nodejs/

Below is my system state. I'm stuck, any help would be greatly appreciated.

# cat /etc/alpine-release 
3.4.0

# apk add --update --repository http://dl-3.alpinelinux.org/alpine/edge/testing vips-tools
fetch http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
OK: 242 MiB in 64 packages

# npm install sharp@0.18.1

> sharp@0.18.1 install /app/node_modules/sharp
> node-gyp rebuild

ERROR: musl libc (x86_64) requires manual installation
gyp: Call to 'LDD_VERSION="musl libc (x86_64)
Version 1.1.16
Dynamic Program Loader
Usage: ldd [options] [--] pathname" node -e "require('./binding').download_vips()"' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.8.0-54-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/node_modules/sharp
gyp ERR! node -v v8.1.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm WARN stemn@0.0.817 No license field.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.18.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the sharp@0.18.1 install script.
lovell commented 7 years ago

Have you installed vips-dev (as well as, or instead of, vips-tools)? http://pkgs.alpinelinux.org/packages?name=vips-dev

sabrehagen commented 7 years ago

Installing vips-dev got me a step closer. Have run into this issue now:


> sharp@0.18.1 install /app/node_modules/sharp
> node-gyp rebuild

Package fftw3 was not found in the pkg-config search path.
Perhaps you should add the directory containing `fftw3.pc'
to the PKG_CONFIG_PATH environment variable
Package 'fftw3', required by 'vips', not found
Package 'fftw3', required by 'vips', not found
gyp: Call to 'PKG_CONFIG_PATH=":$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig" pkg-config --cflags-only-I vips-cpp vips glib-2.0 | sed s\/-I//g' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at emitTwo (events.js:125:13)
gyp ERR! stack     at ChildProcess.emit (events.js:213:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:197:12)
gyp ERR! System Linux 4.8.0-54-generic
gyp ERR! command "/usr/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /app/node_modules/sharp
gyp ERR! node -v v8.1.0
gyp ERR! node-gyp -v v3.6.2

# vips -v
vips-8.5.6-Sun Jun 11 18:20:56 GMT 2017

# apk info | grep fftw
fftw-double-libs
fftw-single-libs
fftw-long-double-libs
fftw
lovell commented 7 years ago

fftw-dev may be required also.

sabrehagen commented 7 years ago

That's it - thanks so much!

wbyoung commented 7 years ago

Should this go in the main docs as well?

wbyoung commented 7 years ago

@lovell oh I see… it's on latest and not stable at this point.

lovell commented 7 years ago

@wbyoung That's correct, each release automagically promotes the latest docs as "stable". Sorry for any confusion.

wbyoung commented 7 years ago

@lovell thanks for the quick responses & the awesome tools!