Node.js:尝试加载 binding.gyp 时调用 'node findJavaHome.js' 返回退出状态 127
Node.js: Call to 'node findJavaHome.js' returned exit status 127. while trying to load binding.gyp
我克隆了 node-java 并且当我 运行 node-gyp configure build 或 npm install 时,我收到以下错误。我的 JAVA_HOME 设置为:/opt/java/jdk1.7/latest 并且适用于某些 Java 应用程序。我正在使用 Ubuntu 14.04.2 LTS
gyp: Call to 'node findJavaHome.js' returned exit status 127. 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/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "configure" "build"
gyp ERR! cwd /home/dev/temp/node-java
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
这是由于 Ubuntu 上的 node/nodejs 命名问题。我通过执行来绕过错误:
sudo ln -s /usr/bin/nodejs /usr/bin/node
虽然这里有不同的首选解决方案:nodejs vs node on ubuntu 12.04
我克隆了 node-java 并且当我 运行 node-gyp configure build 或 npm install 时,我收到以下错误。我的 JAVA_HOME 设置为:/opt/java/jdk1.7/latest 并且适用于某些 Java 应用程序。我正在使用 Ubuntu 14.04.2 LTS
gyp: Call to 'node findJavaHome.js' returned exit status 127. 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/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.13.0-55-generic
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "configure" "build"
gyp ERR! cwd /home/dev/temp/node-java
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok
这是由于 Ubuntu 上的 node/nodejs 命名问题。我通过执行来绕过错误:
sudo ln -s /usr/bin/nodejs /usr/bin/node
虽然这里有不同的首选解决方案:nodejs vs node on ubuntu 12.04