无法在centos 6.5 64bit上安装npm的node-xmpp-client

时间:2015-01-07 21:29:03

标签: node.js

我总是得到这个" gyp ERR! stack错误:产生EACCES"在节点0.10.30

中安装node-xmpp-client时
gyp ERR! configure error
gyp ERR! stack Error: spawn EACCES
gyp ERR! stack     at errnoException (child_process.js:1001:11)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:792:34)
gyp ERR! System Linux 2.6.32-504.3.3.el6.x86_64
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/node-xmpp-client/node_modules/node-xmpp-core/node_modules/ltx/node_modules/node-expat
gyp ERR! node -v v0.10.30
gyp ERR! node-gyp -v v0.13.1
gyp ERR! not ok
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/local/lib/node_modules/npm-debug.log
npm ERR! not ok code 0

npm-debug.log的最后一行

3444 verbose lock tar:///root/.npm/async/0.9.0/package.tgz /root/.npm/3975aa3c-root-npm-async-0-9-0-package-tgz.lock
3445 error Error: ENOENT, chown '/usr/local/lib/node_modules/node-xmpp-client/node_modules/node-xmpp-core/node_modules/ltx/node_modules/sax/LICENSE'
3446 error If you need help, you may report this *entire* log,
3446 error including the npm and node versions, at:
3446 error     <http://github.com/npm/npm/issues>
3447 error System Linux 2.6.32-504.3.3.el6.x86_64
3448 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-xmpp-client" "-g"
3449 error cwd /usr/local/lib/node_modules
3450 error node -v v0.10.30
3451 error npm -v 1.4.21
3452 error path /usr/local/lib/node_modules/node-xmpp-client/node_modules/node-xmpp-core/node_modules/ltx/node_modules/sax/LICENSE
3453 error fstream_path /usr/local/lib/node_modules/node-xmpp-client/node_modules/node-xmpp-core/node_modules/ltx/node_modules/sax/LICENSE
3454 error fstream_type File
3455 error fstream_class FileWriter
3456 error fstream_finish_call chown
3457 error code ENOENT
3458 error errno 34
3459 error fstream_stack /usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:305:19
3459 error fstream_stack /usr/local/lib/node_modules/npm/node_modules/graceful-fs/polyfills.js:143:7
3459 error fstream_stack Object.oncomplete (evalmachine.<anonymous>:107:15)
3460 verbose exit [ 34, true ]

npm cache clean之后我得到了相同的gyp rebuild错误,而在npm-debug.log中,最后一行是:

2138 info preuninstall node-xmpp-client@1.0.0-alpha19
2139 info uninstall node-xmpp-client@1.0.0-alpha19
2140 verbose true,/usr/local/lib/node_modules,/usr/local/lib/node_modules unbuild node-xmpp-client@1.0.0-alpha19
2141 info postuninstall node-xmpp-client@1.0.0-alpha19
2142 error node-stringprep@0.5.4 install: `node-gyp rebuild`
2142 error Exit status 1
2143 error Failed at the node-stringprep@0.5.4 install script.
2143 error This is most likely a problem with the node-stringprep package,
2143 error not with npm itself.
2143 error Tell the author that this fails on your system:
2143 error     node-gyp rebuild
2143 error You can get their info via:
2143 error     npm owner ls node-stringprep
2143 error There is likely additional logging output above.
2144 error System Linux 2.6.32-504.3.3.el6.x86_64
2145 error command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "node-xmpp-client" "-g"
2146 error cwd /usr/local/lib/node_modules
2147 error node -v v0.10.30
2148 error npm -v 1.4.21
2149 error code ELIFECYCLE
2150 verbose exit [ 1, true ]

安装的Python版本是2.7.6

1 个答案:

答案 0 :(得分:1)

我发现了问题: 作为这里的州:http://node-xmpp.github.io/doc/nodestringprep.html我所要做的就是:

yum install libicu-devel

之后由于尝试安装node-xmpp-client失败,我得到了一些

npm ERR! EEXIST, mkdir

修正如下:NPM wont run due to EEXIST error 删除〜/ .npmrc