我試過這個命令:如何在Ubuntu 16.04上安裝npm 3.10.8?
npm install [email protected]
,我得到這個錯誤:
npm ERR! Linux 4.4.0-21-generic
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "[email protected]"
npm ERR! node v4.2.6
npm ERR! npm v3.5.2
npm ERR! code ECONNRESET
npm ERR! network tunneling socket could not be established, cause=socket hang up
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! Please include the following file with any support request:
npm ERR! /home/user/npm-debug.log
正如所述,請添加以下任何支持請求的文件: /home/user/npm-debug.log,請將其添加到http://pastebin.com/index.php。不要粘貼在這裏。 – GeekAb