使用npm install命令竟然报错,求帮助!
发布于 11 年前 作者 dudushuang 26557 次浏览 最后一次编辑是 8 年前

[root/data/home/wechat]# npm install xml2js npm http GET https://registry.npmjs.org/xml2js/0.2.6 npm http GET https://registry.npmjs.org/xml2js/0.2.6 npm http GET https://registry.npmjs.org/xml2js/0.2.6 npm ERR! Error: SSL Error: CERT_UNTRUSTED npm ERR! at ClientRequest.<anonymous> (/usr/local/node/0.9.0/lib/node_modules/npm/node_modules/request/main.js:440:26) npm ERR! at ClientRequest.g (events.js:185:14) npm ERR! at ClientRequest.EventEmitter.emit (events.js:88:17) npm ERR! at HTTPParser.parserOnIncomingClient (http.js:1445:7) npm ERR! at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:111:23) npm ERR! at CleartextStream.socketOnData (http.js:1356:20) npm ERR! at CleartextStream.CryptoStream._push (tls.js:515:27) npm ERR! at SecurePair.cycle (tls.js:869:20) npm ERR! at EncryptedStream.CryptoStream.write (tls.js:256:13) npm ERR! at Socket.ondata (stream.js:38:26) npm ERR! If you need help, you may report this log at: npm ERR! http://github.com/isaacs/npm/issues npm ERR! or email it to: npm ERR! <npm-@googlegroups.com>

npm ERR! System Linux 2.6.32.57-tlinux_xenU-1.1.rc10.qcloud-qcloud npm ERR! command “/usr/local/node/0.9.0/bin/node” “/usr/local/node/0.9.0/bin/npm” “install” "xml2js" npm ERR! cwd /data/home/wechat npm ERR! node -v v0.9.0 npm ERR! npm -v 1.1.44 npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /data/home/wechat/npm-debug.log npm ERR! not ok code 0

请问。这个错误npm ERR! Error: SSL Error: CERT_UNTRUSTED 是什么原因导致的,如何解决呢?

6 回复

楼主的node版本是不稳定版呃,升级到node v0.10+试试呢

啊咧。是因为版本问题哦。目前用的是v0.10.12 这个版本有啥缺点不?

@dudushuang 有一个比较严重的Http漏洞,如果是生产环境使用的话建议升级到最新的0.10.24吧,玩玩的话就无所谓了

@dead_horse 啊咧,竟然有漏洞。恩恩,谢谢大神。我们目前是生产环境。

@dead-horse 什么严重漏洞,能给讲讲吗

@yunnysunny 两年前的事情你觉得我还记得么。。。

回到顶部