Node.js npm无法在Centos 6.6上安装less(错误:无法从注册表获取less)

Node.js npm无法在Centos 6.6上安装less(错误:无法从注册表获取less),node.js,npm,less,Node.js,Npm,Less,我想通过npm在Centos 6.6上安装更少的模块,但我遇到了一些问题 已执行命令: [dinghao@localhost ~]$ sudo npm install -g less 错误日志: npm http GET https://registry.npm.taobao.org/less npm http GET https://registry.npm.taobao.org/less npm http GET https://registry.npm.taobao.org/less n

我想通过npm在Centos 6.6上安装更少的模块,但我遇到了一些问题

已执行命令:

[dinghao@localhost ~]$ sudo npm install -g less
错误日志:

npm http GET https://registry.npm.taobao.org/less
npm http GET https://registry.npm.taobao.org/less
npm http GET https://registry.npm.taobao.org/less
npm ERR! Error: failed to fetch from registry: less
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/get.js:140:18)
npm ERR!     at cb (/usr/lib/node_modules/npm-registry-client/lib/request.js:32:9)
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/request.js:122:10)
npm ERR!     at cb (/usr/lib/node_modules/npm-registry-client/lib/request.js:132:9)
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/request.js:225:20)
npm ERR!     at Request._callback (/usr/lib/node_modules/npm-registry-client/lib/request.js:204:20)
npm ERR!     at self.callback (/usr/lib/node_modules/request/index.js:148:22)
npm ERR!     at Request.emit (events.js:117:20)
npm ERR!     at ClientRequest.self.clientErrorHandler (/usr/lib/node_modules/request/index.js:257:10)
npm ERR!     at ClientRequest.emit (events.js:95:17)
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-504.el6.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "-g" "less"
npm ERR! cwd /home/dinghao
npm ERR! node -v v0.10.36
npm ERR! npm -v 1.3.6
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /home/dinghao/npm-debug.log
npm ERR! not ok code 0
npmhttpgethttps://registry.npm.taobao.org/less
npm http GEThttps://registry.npm.taobao.org/less
npm http GEThttps://registry.npm.taobao.org/less
npm错误!错误:无法从注册表获取:更少
npm错误!在RegClient。(/usr/lib/node_modules/npm registry client/lib/get.js:140:18)
npm错误!在cb(/usr/lib/node_modules/npm registry client/lib/request.js:32:9)
npm错误!在RegClient。(/usr/lib/node_modules/npm registry client/lib/request.js:122:10)
npm错误!在cb(/usr/lib/node_modules/npm registry client/lib/request.js:132:9)
npm错误!在RegClient。(/usr/lib/node_modules/npm registry client/lib/request.js:225:20)
npm错误!在请求时。\回调(/usr/lib/node\u modules/npm registry client/lib/Request.js:204:20)
npm错误!在self.callback(/usr/lib/node_modules/request/index.js:148:22)
npm错误!at Request.emit(events.js:117:20)
npm错误!在ClientRequest.self.clientErrorHandler(/usr/lib/node_modules/request/index.js:257:10)
npm错误!在ClientRequest.emit(events.js:95:17)
npm错误!如果需要帮助,您可以在以下位置报告此日志:
npm错误!
npm错误!或通过电子邮件发送至:
npm错误!
npm错误!系统Linux 2.6.32-504.el6.x86_64
npm错误!命令“node”“/usr/bin/npm”“install”“-g”“less”
npm错误!cwd/家庭/丁浩
npm错误!节点-v v0.10.36
npm错误!npm-V1.3.6
npm错误!
npm错误!其他日志记录详细信息可在以下位置找到:
npm错误/home/dinghao/npm-debug.log
npm错误!不正常代码0

如何解决此问题?

?使用npm云中托管的私有npm模块的R u?当我通过Chrome调用该注册表时,我看到了该注册表的响应。我想你可能是在代理/低互联网连接背后?你正在使用淘宝npm注册表,我再试一次,我成功安装了它。请删除
sudo
并重新安装。或者您可以尝试使用以下命令进行安装:
npm install-g less--registry=http://registry.npmjs.org
,从npm Official注册表获取软件包信息。@Sathish我可以从注册表获取响应,但通过上面的命令得到错误。此外,我的工作环境位于vmware workstation 10上。这是导致错误的原因吗?使用npm云中托管的私有npm模块的R u?当我通过Chrome调用该注册表时,我看到了该注册表的响应。我想你可能是在代理/低互联网连接背后?你正在使用淘宝npm注册表,我再试一次,我成功安装了它。请删除
sudo
并重新安装。或者您可以尝试使用以下命令进行安装:
npm install-g less--registry=http://registry.npmjs.org
,从npm Official注册表获取软件包信息。@Sathish我可以从注册表获取响应,但通过上面的命令得到错误。此外,我的工作环境位于vmware workstation 10上。这是导致错误的原因吗?