我无法安装socket.IO。如果这很重要的话,那就是我的生活。我正在从blog学习,我已经安装到Node js。但我无法在我的Ubuntu VM中安装它。我收到这个错误:
(chatn)robin@robin-VirtualBox:~/webs/chatn$ sudo npm install socket.io
npm http GET http://registry/socket.io
npm http GET http://registry/socket.io
npm http GET http://registry/socket.io
npm http GET http://registry.npmjs.org/socket.io/-/socket.io-0.9.16.tgz
npm http 503 http://registry.npmjs.org/socket.io/-/socket.io-0.9.16.tgz
npm ERR! fetch failed http://registry.npmjs.org/socket.io/-/socket.io-0.9.16.tgz
npm http GET http://registry.npmjs.org/socket.io/-/socket.io-0.9.16.tgz
npm http 503 http://registry.npmjs.org/socket.io/-/socket.io-0.9.16.tgz
npm ERR! fetch failed http://registry.npmjs.org/socket.io/-/socket.io-0.9.16.tgz
npm http GET http://registry.npmjs.org/socket.io/-/socket.io-0.9.16.tgz
npm http 200 http://registry.npmjs.org/socket.io/-/socket.io-0.9.16.tgz
npm http GET http://registry/socket.io-client/0.9.16
npm http GET http://registry/policyfile/0.0.4
npm http GET http://registry/base64id/0.1.0
npm http GET http://registry/redis/0.7.3
npm http GET http://registry/socket.io-client/0.9.16
npm http GET http://registry/policyfile/0.0.4
npm http GET http://registry/redis/0.7.3
npm http GET http://registry/base64id/0.1.0
npm http GET http://registry/redis/0.7.3
npm http GET http://registry/base64id/0.1.0
npm WARN optional dep failed, continuing redis@0.7.3
npm ERR! network getaddrinfo ENOTFOUND
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "socket.io"
npm ERR! cwd /home/robin/webs/chatn
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm http GET http://registry/socket.io-client/0.9.16
npm http GET http://registry/policyfile/0.0.4
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/robin/webs/chatn/npm-debug.log
npm ERR! not ok code 0
我只是不知道这里发生了什么。
更新
尝试安装'yeoman',但又得到了这条消息:
advenio@advenio-VirtualBox:~$ npm install -g yo
npm http GET http://registry/yo
npm http GET http://registry/yo
npm http GET http://registry/yo
npm ERR! network getaddrinfo ENOTFOUND
npm ERR! network This is most likely not a problem with npm itself
npm ERR! network and is related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
npm ERR! System Linux 3.11.0-12-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "-g" "yo"
npm ERR! cwd /home/advenio
npm ERR! node -v v0.10.26
npm ERR! npm -v 1.4.3
npm ERR! syscall getaddrinfo
npm ERR! code ENOTFOUND
npm ERR! errno ENOTFOUND
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/advenio/npm-debug.log
npm ERR! not ok code 0