NPM:缺少注册表

时间:2014-02-09 05:24:40

标签: javascript node.js npm

npm http GET https://registry.npmjs.org/n

npm ERR! Error: failed to fetch from registry: n
npm ERR!     at /usr/share/npm/lib/utils/npm-registry-client/get.js:139:12
npm ERR!     at cb (/usr/share/npm/lib/utils/npm-registry-client/request.js:31:9)
npm ERR!     at Request._callback (/usr/share/npm/lib/utils/npm-registry-client/request.js:136:18)
npm ERR!     at Request.callback (/usr/lib/nodejs/request/main.js:119:22)
npm ERR!     at Request.<anonymous> (/usr/lib/nodejs/request/main.js:212:58)
npm ERR!     at Request.emit (events.js:88:20)
npm ERR!     at ClientRequest.<anonymous> (/usr/lib/nodejs/request/main.js:209:10)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at CleartextStream.<anonymous> (http.js:1137:11)
npm ERR!     at CleartextStream.emit (events.js:67:17)
npm ERR! You may report this log at:
npm ERR!     <http://bugs.debian.org/npm>
npm ERR! or use
npm ERR!     reportbug --attach /var/www/npm-debug.log npm
npm ERR! 
npm ERR! System Linux 3.2.0-58-generic
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "n"
npm ERR! cwd /var/www
npm ERR! node -v v0.6.12
npm ERR! npm -v 1.1.4
npm ERR! message failed to fetch from registry: n
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/npm-debug.log
npm not ok

我试图更新nodejs安装,但我不能。

我按照here步骤进行了操作。

1 个答案:

答案 0 :(得分:0)

好的,我已经回答了我自己的问题。

直接来自存储库的sudo apt-get install nodejs只会给你最多v.0.06。

所以我做的是以下

https://launchpad.net/~chris-lea/+archive/node.js/

我添加了PPA,然后再次完成整个安装nodejs。

之后,版本现在是v.0.10

希望这可以帮助我的任何人。