Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/wix/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Node.js npm错误!在ubuntu上获取失败_Node.js - Fatal编程技术网

Node.js npm错误!在ubuntu上获取失败

Node.js npm错误!在ubuntu上获取失败,node.js,Node.js,我正在尝试将node、express和mongo安装到具有Intel®内核的联想u430上™ i5-4258U CPU@2.40GHz×4,运行Ubuntu 13.10。我正试着用它 当我走到台阶上跑步时(与sudo一起) 我得到以下错误: npm http GET https://registry.npmjs.org/express npm http GET https://registry.npmjs.org/express/-/express-3.4.4.tgz npm ERR! fail

我正在尝试将node、express和mongo安装到具有Intel®内核的联想u430上™ i5-4258U CPU@2.40GHz×4,运行Ubuntu 13.10。我正试着用它

当我走到台阶上跑步时(与sudo一起)

我得到以下错误:

npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/express/-/express-3.4.4.tgz
npm ERR! failed to fetch https://registry.npmjs.org/express/-/express-3.4.4.tgz

npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!     at ClientRequest.<anonymous> /usr/local/lib/node_modules/npm/node_modules/request/main.js:356:28)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1261:11)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR!     at CleartextStream.ondata (http.js:1150:24)
npm ERR!     at CleartextStream._push (tls.js:375:27)
npm ERR!     at SecurePair.cycle (tls.js:734:20)
npm ERR!     at EncryptedStream.write (tls.js:130:13)
npm ERR!     at Socket.ondata (stream.js:38:26)
npm ERR!     at Socket.emit (events.js:67:17)
npm ERR! 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! 
npm ERR! System Linux 3.11.0-20-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "express"
npm ERR! cwd /usr/local/src/npm
npm ERR! node -v v0.6.11
npm ERR! npm -v 1.1.1
npm ERR! message SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/local/src/npm/npm-debug.log
npm not ok
npmhttpgethttps://registry.npmjs.org/express
npm http GEThttps://registry.npmjs.org/express/-/express-3.4.4.tgz
npm错误!无法获取https://registry.npmjs.org/express/-/express-3.4.4.tgz
npm错误!错误:SSL错误:链中的自签名证书
npm错误!在ClientRequest/usr/local/lib/node_modules/npm/node_modules/request/main.js:356:28)
npm错误!在ClientRequest.emit(events.js:67:17)
npm错误!在HTTPParser.onIncoming(http.js:1261:11)
npm错误!在HTTPParser.onHeadersComplete(http.js:102:31)
npm错误!在CleartextStream.ondata(http.js:1150:24)
npm错误!在CleartextStream上,推送(tls.js:375:27)
npm错误!在SecurePair.cycle(tls.js:734:20)
npm错误!在EncryptedStream.write(tls.js:130:13)
npm错误!在Socket.ondata(stream.js:38:26)
npm错误!在Socket.emit(events.js:67:17)
npm错误!您可以在以下位置报告此日志:
npm错误!
npm错误!或通过电子邮件发送至:
npm错误!
npm错误!
npm错误!Linux系统3.11.0-20-generic
npm错误!命令“node”“/usr/local/bin/npm”“install”“-g”“express”
npm错误!cwd/usr/local/src/npm
npm错误!节点-v v0.6.11
npm错误!npm-V1.1.1
npm错误!消息SSL错误:链中的自签名证书
npm错误!
npm错误!其他日志记录详细信息可在以下位置找到:
npm错误/usr/local/src/npm/npm-debug.log
npm不好
我注意到错误消息告诉我有节点-v0.6.11,但是当我运行 节点-v 从cl上看,它不返回任何内容。但是如果我跑 nodejs-v 从命令行我得到 v0.10.28
我已经为此搜索了几个小时,但没有找到任何解决方案/解决方法。

尝试
sudo apt get install nodejs legacy
,它将安装一个符号链接,以便
node
将指向
nodejs
。您使用的是http/https代理吗?我尝试了
sudo apt get install nodejs legacy
,但没有安装。获取了
dpkg:error processing/var/cache/apt/archives/nodejs-legacy_0.10.15~dfsg1-4_all.deb(--unpack):
。我没有使用代理(我知道),但我是一个相对的Linux noob
npm http GET https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/express/-/express-3.4.4.tgz
npm ERR! failed to fetch https://registry.npmjs.org/express/-/express-3.4.4.tgz

npm ERR! Error: SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR!     at ClientRequest.<anonymous> /usr/local/lib/node_modules/npm/node_modules/request/main.js:356:28)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1261:11)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR!     at CleartextStream.ondata (http.js:1150:24)
npm ERR!     at CleartextStream._push (tls.js:375:27)
npm ERR!     at SecurePair.cycle (tls.js:734:20)
npm ERR!     at EncryptedStream.write (tls.js:130:13)
npm ERR!     at Socket.ondata (stream.js:38:26)
npm ERR!     at Socket.emit (events.js:67:17)
npm ERR! 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! 
npm ERR! System Linux 3.11.0-20-generic
npm ERR! command "node" "/usr/local/bin/npm" "install" "-g" "express"
npm ERR! cwd /usr/local/src/npm
npm ERR! node -v v0.6.11
npm ERR! npm -v 1.1.1
npm ERR! message SSL Error: SELF_SIGNED_CERT_IN_CHAIN
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /usr/local/src/npm/npm-debug.log
npm not ok