node-gyp: Permission denied when installing on FreeBSD
mikl opened this issue · 4 comments
I get this error when ever I try to install node-proxy 0.6.0 on any of my FreeBSD-boxes.
% npm install node-proxy
npm http GET https://registry.npmjs.org/node-proxy
npm http 304 https://registry.npmjs.org/node-proxy
> node-proxy@0.6.0 install /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules/node-proxy
> node-gyp configure build
node-gyp: Permission denied
npm ERR! node-proxy@0.6.0 install: `node-gyp configure build`
npm ERR! `sh "-c" "node-gyp configure build"` failed with 126
npm ERR!
npm ERR! Failed at the node-proxy@0.6.0 install script.
npm ERR! This is most likely a problem with the node-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls node-proxy
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System FreeBSD 9.0-RELEASE
npm ERR! command "node" "/usr/local/bin/npm" "install" "node-proxy"
npm ERR! cwd /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.21
npm ERR! code ELIFECYCLE
npm ERR! message node-proxy@0.6.0 install: `node-gyp configure build`
npm ERR! message `sh "-c" "node-gyp configure build"` failed with 126
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/npm-debug.log
npm not ok
Here is the details from npm-debug.log
:
verbose about to build /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules/node-proxy
info build /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules/node-proxy
verbose from cache /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules/node-proxy/package.json
verbose linkStuff [ false,
verbose linkStuff false,
verbose linkStuff false,
verbose linkStuff '/srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules' ]
info linkStuff node-proxy@0.6.0
verbose linkBins node-proxy@0.6.0
verbose linkMans node-proxy@0.6.0
verbose rebuildBundles node-proxy@0.6.0
info install node-proxy@0.6.0
verbose unsafe-perm in lifecycle true
silly exec sh "-c" "node-gyp configure build"
silly spawning [ 'sh',
silly spawning [ '-c', 'node-gyp configure build' ],
silly spawning '/srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules/node-proxy' ]
info node-proxy@0.6.0 Failed to exec install script
info unbuild /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules/node-proxy
verbose from cache /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules/node-proxy/package.json
info preuninstall node-proxy@0.6.0
info uninstall node-proxy@0.6.0
verbose unbuild node-proxy@0.6.0 [ true,
verbose unbuild node-proxy@0.6.0 '/srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules',
verbose unbuild node-proxy@0.6.0 '/srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules' ]
info postuninstall node-proxy@0.6.0
ERR! node-proxy@0.6.0 install: `node-gyp configure build`
ERR! `sh "-c" "node-gyp configure build"` failed with 126
ERR!
ERR! Failed at the node-proxy@0.6.0 install script.
ERR! This is most likely a problem with the node-proxy package,
ERR! not with npm itself.
ERR! Tell the author that this fails on your system:
ERR! node-gyp configure build
ERR! You can get their info via:
ERR! npm owner ls node-proxy
ERR! There is likely additional logging output above.
ERR!
ERR! System FreeBSD 9.0-RELEASE
ERR! command "node" "/usr/local/bin/npm" "install" "node-proxy"
ERR! cwd /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs
ERR! node -v v0.6.19
ERR! npm -v 1.1.21
ERR! code ELIFECYCLE
ERR! message node-proxy@0.6.0 install: `node-gyp configure build`
ERR! message `sh "-c" "node-gyp configure build"` failed with 126
ERR! errno {}
verbose exit [ 1, true ]
I hope this makes more sense to you than it does to me :)
Ah, it seems this is the error message you get when node-gyp
is not installed. After installing it, I get a different error message, however:
% npm install node-proxy
npm http GET https://registry.npmjs.org/node-proxy
npm http 304 https://registry.npmjs.org/node-proxy
> node-proxy@0.6.0 install /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/node_modules/node-proxy
> node-gyp configure build
gyp http GET http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz
gyp http 200 http://nodejs.org/dist/v0.6.19/node-v0.6.19.tar.gz
"Makefile", line 17: Need an operator
"Makefile", line 19: Need an operator
"Makefile", line 21: Need an operator
"Makefile", line 115: Need an operator
"Makefile", line 117: Need an operator
"Makefile", line 119: Need an operator
"Makefile", line 128: Need an operator
"Makefile", line 129: Need an operator
"Makefile", line 218: Need an operator
"Makefile", line 231: Need an operator
"Makefile", line 239: Need an operator
Error expanding embedded variable.
gyp ERR! build error Error: `make` failed with exit code: 2
gyp ERR! build error at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:214:23)
gyp ERR! build error at ChildProcess.EventEmitter.emit (events.js:70:17)
gyp ERR! build error at maybeExit (child_process.js:362:16)
gyp ERR! build error at Process._internal.onexit (child_process.js:398:5)
gyp ERR! not ok
npm ERR! node-proxy@0.6.0 install: `node-gyp configure build`
npm ERR! `sh "-c" "node-gyp configure build"` failed with 1
npm ERR!
npm ERR! Failed at the node-proxy@0.6.0 install script.
npm ERR! This is most likely a problem with the node-proxy package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp configure build
npm ERR! You can get their info via:
npm ERR! npm owner ls node-proxy
npm ERR! There is likely additional logging output above.
npm ERR!
npm ERR! System FreeBSD 9.0-RELEASE
npm ERR! command "node" "/usr/local/bin/npm" "install" "node-proxy"
npm ERR! cwd /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs
npm ERR! node -v v0.6.19
npm ERR! npm -v 1.1.21
npm ERR! code ELIFECYCLE
npm ERR! message node-proxy@0.6.0 install: `node-gyp configure build`
npm ERR! message `sh "-c" "node-gyp configure build"` failed with 1
npm ERR! errno {}
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /srv/www/development/d7/opeka/sites/all/modules/opeka/nodejs/npm-debug.log
npm not ok
Hello,
You need python, make and C/C++ compiler like GCC.
Try this...
- $ npm install -g node-gyp
- Download node-proxy zip file.
- Move to your node-modules folder
- Go to node-proxy folder
- $ node-gyp configure
- $ node-gyp build
See more: https://github.com/TooTallNate/node-gyp
my OS FreeBSD 7.3
pwd
/usr/local/lib/node_modules/node-proxynode-gyp configure
gyp info it worked if it ends with ok
gyp info using node-gyp@0.5.2
gyp info using node@0.6.18
gyp info spawn python
gyp info spawn args [ '/root/.node-gyp/0.6.18/tools/gyp_addon',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-I/usr/local/lib/node_modules/node-proxy/build/config.gypi',
gyp info spawn args '-f',
gyp info spawn args 'make' ]
gyp info done oknode-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@0.5.2
gyp info using node@0.6.18
"Makefile", line 17: Need an operator
gyp"Makefile", line 19: Need an operator
"Makefile", line 21: Need an operatorinfo
"Makefile", line 115: Need an operator
"Makefile", line 117: spawnNeed an operator
make
"Makefile", line 119: Need an operator
"Makefile", line 128: Need an operatorgyp
"Makefile", line 129: Need an operator
"Makefile", line 218: infoNeed an operator
"Makefile", line 231: Need an operator
spawn args"Makefile", line 239: Need an operator [ 'BUILDTYPE=Release', '-C', 'build' ]
Error expanding embedded variable.
gyp ERR! build error Error: make
failed with exit code: 2
gyp ERR! build error at ChildProcess.onExit (/usr/local/lib/node_modules/node-gyp/lib/build.js:214:23)
gyp ERR! build error at ChildProcess.emit (events.js:70:17)
gyp ERR! build error at maybeExit (child_process.js:362:16)
gyp ERR! build error at Process.onexit (child_process.js:398:5)
gyp ERR! not ok
This is not a problem with node-proxy.