我在亚马逊上运行Ec2并成功安装了节点7。我还确保安装了node-gyp。我目前正在尝试为titan-gremlin功能添加一些其他软件包,每次安装时都会收到相同的错误消息。
/root/.nvm/versions/node/v7.0.0/bin/ts-java -> /root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/bin/ts-java.sh
/root/.nvm/versions/node/v7.0.0/bin/ts-java.js -> /root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/bin/ts-java.js
> java@0.7.2 install /root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/node_modules/java
> node-gyp rebuild
sh: node-gyp: command not found
/root/.nvm/versions/node/v7.0.0/lib
└── (empty)
npm ERR! Linux 4.4.35-33.55.amzn1.x86_64
npm ERR! argv "/root/.nvm/versions/node/v7.0.0/bin/node" "/root/.nvm/versions/node/v7.0.0/bin/npm" "install" "-g" "ts-java"
npm ERR! node v7.0.0
npm ERR! npm v3.10.8
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! java@0.7.2 install: `node-gyp rebuild`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the java@0.7.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 java 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 java
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls java
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log
npm ERR! code 1
我在绳子的尽头。我确保所有用户都可以访问node-gyp。请帮忙。
这是调试日志
verbose lifecycle java@0.7.2~install: PATH: /root/.nvm/versions/node/v7.0.0/lib/node_modules/npm/bin/node-gyp- bin:/root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/node_modules/java/node_modules/.bin:/root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/node_modules/.bin:/root/.nvm/versions/node/v7.0.0/lib/node_modules/.bin:/root/.nvm/versions/node/v7.0.0/bin:/usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin:/root/bin
11008 verbose lifecycle java@0.7.2~install: CWD: /root/.nvm/versions/node/v7.0.0/lib/node_modules/ts-java/node_modules/java
11009 silly lifecycle java@0.7.2~install: Args: [ '-c', 'node-gyp rebuild' ]
11010 info lifecycle java@0.7.2~install: Failed to exec install script
11011 verbose unlock done using /root/.npm/_locks/staging-bbc034c0b63d0621.lock for /root/.nvm/versions/node/v7.0.0/lib/node_modules/.staging
11012 silly rollbackFailedOptional Starting
11013 silly rollbackFailedOptional Finishing
11014 silly runTopLevelLifecycles Finishing
11015 silly install printInstalled
11016 verbose stack Error: java@0.7.2 install: `node-gyp rebuild`
11016 verbose stack spawn ENOENT
11016 verbose stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v7.0.0/lib/node_modules/npm/lib/utils/spawn.js:33:16)
11016 verbose stack at emitTwo (events.js:106:13)
11016 verbose stack at ChildProcess.emit (events.js:191:7)
11016 verbose stack at maybeClose (internal/child_process.js:877:16)
11016 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
11017 verbose pkgid java@0.7.2
11018 verbose cwd /root
11019 error Linux 4.4.35-33.55.amzn1.x86_64
11020 error argv "/root/.nvm/versions/node/v7.0.0/bin/node" "/root/.nvm/versions/node/v7.0.0/bin/npm" "install" "-g" "ts-java"
11021 error node v7.0.0
11022 error npm v3.10.8
11023 error file sh
11024 error code ELIFECYCLE
11025 error errno ENOENT
11026 error syscall spawn
11027 error java@0.7.2 install: `node-gyp rebuild`
11027 error spawn ENOENT
11028 error Failed at the java@0.7.2 install script 'node-gyp rebuild'.
11028 error Make sure you have the latest version of node.js and npm installed.
11028 error If you do, this is most likely a problem with the java package,
11028 error not with npm itself.
11028 error Tell the author that this fails on your system:
11028 error node-gyp rebuild
11028 error You can get information on how to open an issue for this project with:
11028 error npm bugs java
11028 error Or if that isn't available, you can get their info via:
11028 error npm owner ls java
11028 error There is likely additional logging output above.
11029 verbose exit [ 1, true ]
答案 0 :(得分:1)
我最终需要使用
安装gypsudo yum install gyp
感谢任何花时间研究这个问题的人。