-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
Milestone
Description
I'm using sharp in my application and I have two environments on the same Linux host for testing and qa. Each environment uses a separate user account. I deploy sharp by running npm install in each environment, however, the installation process leaves behind /tmp/libvips-8.1.1-lin.tar.gz file. When I run npm install in the second account the file gets in the way and it cannot be deleted by npm install process since it was created by a different user and the process fails with an error like this:
stderr: stream.js:74
throw er; // Unhandled stream error in pipe.
^
Error: EACCES: permission denied, open '/tmp/libvips-8.1.1-lin.tar.gz'
at Error (native)
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 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:355:16)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.5-x86_64-linode61
gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/intelocate/webapp/node_modules/sharp
gyp ERR! node -v v5.3.0
gyp ERR! node-gyp -v v3.0.3
gyp ERR! not ok
npm ERR! Linux 4.1.5-x86_64-linode61
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "sharp"
npm ERR! node v5.3.0
npm ERR! npm v3.3.12
npm ERR! code ELIFECYCLE
npm ERR! sharp@0.12.1 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.12.1 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 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/intelocate/webapp/npm-debug.log
stdout:
> sharp@0.12.1 install /home/intelocate/webapp/node_modules/sharp
> node-gyp rebuild
node-uuid@1.4.7 node_modules/node-uuid -> node_modules/request/node_modules/node-uuid
Intelocate@0.1.0 /home/intelocate/webapp
├─┬ hippie@0.4.0
│ └─┬ request@2.55.0
│ └── node-uuid@1.4.7
├─┬ less-brunch@1.8.1
│ └─┬ less@2.5.3
│ └─┬ request@2.67.0
│ └── node-uuid@1.4.7
└─┬ sequelize@3.15.1
└── node-uuid@1.4.7
I'm currently using a script that deletes /tmp/libvips-8.1.1-lin.tar.gz file after each execution of npm install but this is just a workaround and here are few suggestions for permanent fix:
- add userid to the temp file path as follows
/tmp/<userid>/libvips-8.1.1-lin.tar.gz - delete the file after installation (this is less reliable as the file has to be reliably deleted upon failure as well)
- do both :-)
Reactions are currently unavailable