0

Under Node 0.8.20

Compile the node addon from here

Have node-gyp, python 2.7.3 and gcc installed. When running

node-gyp configure

errors occurred. Below is the error outputs:

gyp info it worked if it ends with ok
gyp info using node-gyp@0.8.5
gyp info using node@0.8.20 | linux | arm
gyp ERR! configure error
gyp ERR! stack Error: Command failed: execvp(): Permission denied
gyp ERR! stack
gyp ERR! stack     at ChildProcess.exithandler (child_process.js:540:15)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:99:17)
gyp ERR! stack     at maybeClose (child_process.js:638:16)
gyp ERR! stack     at Socket.ChildProcess.spawn.stdin (child_process.js:815:11)
gyp ERR! stack     at Socket.EventEmitter.emit (events.js:96:17)
gyp ERR! stack     at Socket._destroy.destroyed (net.js:358:10)
gyp ERR! stack     at process.startup.processNextTick.process._tickCallback (node.js:244:9)
gyp ERR! System Linux 3.6.11-7-ARCH+
gyp ERR! command "node" "/root/opt/node/bin/node-gyp" "configure"
gyp ERR! cwd /root/hello
gyp ERR! node -v v0.8.20
gyp ERR! node-gyp -v v0.8.5
gyp ERR! not ok

I have python installed at /root/opt/python/bin/python and node installed at /root/opt/node/bin/node. But I have set path to PATH env.

I couldn't find what wrong is.

geeker
  • 345
  • 6
  • 15

2 Answers2

0

Solved it.

I would like set the path of python to PYTHON_PATH instead of PYTHON. But I have made a mistake that I set the path of python to the environment variable PYTHON. If the PYTHON has been set, node-gyp whould consider it as python exective and never look for python from the PATHs.

So when node-gyp ran python script, it passed the path of a directory to the first parameter of execvp syscalls. Therefore, it got the permission denied error.

geeker
  • 345
  • 6
  • 15
0

My solution was to set npm python paramter:

npm config set python /usr/bin/python2.7
Moshe Simantov
  • 3,937
  • 2
  • 25
  • 35