2016-12-23 173 views
-1

我試過這個命令:如何在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

+0

正如所述,請添加以下任何支持請求的文件: /home/user/npm-debug.log,請將其添加到http://pastebin.com/index.php。不要粘貼在這裏。 – GeekAb

回答

-1

,我使用的一個是從的NodeJS可以

$ sudo apt-get install python-software-properties 
$ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - 
$ sudo apt-get install nodejs 
$ node -v 
$ npm -v 

有運行下面的代碼你去吧,你應該開始運行!請轉至Installing NodeJs

+0

我只是想知道如何解決這個問題? – GeekAb