Erro de instalação do pacote Red Hat 7 npm

1

Estou tentando instalar o npm, mas o sistema me mostra este erro:

[root@myserver etc]# npm install npm@latest -g
npm http GET https://registry.npmjs.org/npm
npm http 200 https://registry.npmjs.org/npm
npm ERR! Error: failed to fetch from registry: npm
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/get.js:134:18)
npm ERR!     at cb (/usr/lib/node_modules/npm-registry-client/lib/request.js:27:9)
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/request.js:122:16)
npm ERR!     at cb (/usr/lib/node_modules/npm-registry-client/lib/request.js:158:9)
npm ERR!     at RegClient.<anonymous> (/usr/lib/node_modules/npm-registry-client/lib/request.js:303:12)
npm ERR!     at Request.self.callback (/usr/lib/node_modules/request/index.js:148:22)
npm ERR!     at Request.emit (events.js:98:17)
npm ERR!     at Request.<anonymous> (/usr/lib/node_modules/request/index.js:891:14)
npm ERR!     at Request.emit (events.js:117:20)
npm ERR!     at IncomingMessage.<anonymous> (/usr/lib/node_modules/request/index.js:842:12)
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!     <[email protected]>

npm ERR! System Linux 3.10.0-693.11.1.el7.x86_64
npm ERR! command "node" "/usr/bin/npm" "install" "npm@latest" "-g"
npm ERR! cwd /etc
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.3.6
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /etc/npm-debug.log
npm ERR! not ok code 0
    
por Gefolge 04.01.2018 / 09:38

1 resposta

2

Eu acho que o problema é a versão você pode tentar isso

yum install -y gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_8.x | sudo -E bash -
    
por 04.01.2018 / 09:45