Question

Je vais avoir des problèmes pour installer le gestionnaire de paquets de noeud « NPM ».

site il vous invite à faire une 1 ligne d'installation comme suit ...

curl http://npmjs.org/install.sh | sh

Cette recrache suit l'erreur d'installation ...

$ curl http://npmjs.org/install.sh | sh
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7184  100  7184    0     0  27012      0 --:--:-- --:--:-- --:--:-- 39256
tar=/usr/bin/tar
version:
bsdtar 2.8.3 - libarchive 2.8.3
fetching: http://registry.npmjs.org/npm/-/npm-1.0.106.tgz
0.4.11
1.0.106
cleanup prefix=/usr

All clean!
npm ERR! Error: EACCES, Permission denied '/usr/bin/npm'
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 11.2.0
npm ERR! command "/usr/bin/node" "/private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.72890/package/cli.js" "rm" "npm" "-gf"
npm ERR! cwd /private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.72890/package
npm ERR! node -v v0.4.11
npm ERR! npm -v 1.0.106
npm ERR! path /usr/bin/npm
npm ERR! code EACCES
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.72890/package/npm-debug.log
npm not ok
npm ERR! error installing npm@1.0.106 Error: EACCES, Permission denied '/usr/bin/npm'
npm ERR! error rolling back npm@1.0.106 Error: EACCES, Permission denied '/usr/bin/npm'
npm ERR! Error: EACCES, Permission denied '/usr/bin/npm'
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 11.2.0
npm ERR! command "/usr/bin/node" "/private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.72890/package/cli.js" "install" "-gf"
npm ERR! cwd /private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.72890/package
npm ERR! node -v v0.4.11
npm ERR! npm -v 1.0.106
npm ERR! path /usr/bin/npm
npm ERR! code EACCES
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.72890/package/npm-debug.log
npm not ok

googler autour il ressemblait à ceci est un problème commun et la façon de le fixer est de simplement exécuter la même commande préfacé avec sudo.

Bizarrement, cela ne semble pas fonctionner dans mon cas. Ce qui se passe si je lance la même commande sudo'd.

$ sudo curl http://npmjs.org/install.sh | sh
Password:
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7184  100  7184    0     0   9974      0 --:--:-- --:--:-- --:--:-- 40359
tar=/usr/bin/tar
version:
bsdtar 2.8.3 - libarchive 2.8.3
fetching: http://registry.npmjs.org/npm/-/npm-1.0.106.tgz
0.4.11
1.0.106
cleanup prefix=/usr

All clean!
npm ERR! Error: EACCES, Permission denied '/usr/bin/npm'
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 11.2.0
npm ERR! command "/usr/bin/node" "/private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.81519/package/cli.js" "rm" "npm" "-gf"
npm ERR! cwd /private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.81519/package
npm ERR! node -v v0.4.11
npm ERR! npm -v 1.0.106
npm ERR! path /usr/bin/npm
npm ERR! code EACCES
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.81519/package/npm-debug.log
npm not ok
npm ERR! error installing npm@1.0.106 Error: EACCES, Permission denied '/usr/bin/npm'
npm ERR! error rolling back npm@1.0.106 Error: EACCES, Permission denied '/usr/bin/npm'
npm ERR! Error: EACCES, Permission denied '/usr/bin/npm'
npm ERR! Report this *entire* log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>
npm ERR! 
npm ERR! System Darwin 11.2.0
npm ERR! command "/usr/bin/node" "/private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.81519/package/cli.js" "install" "-gf"
npm ERR! cwd /private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.81519/package
npm ERR! node -v v0.4.11
npm ERR! npm -v 1.0.106
npm ERR! path /usr/bin/npm
npm ERR! code EACCES
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /private/var/folders/mn/8q6c34bj67xbxk08dwlsb_y40000gn/T/npm.81519/package/npm-debug.log
npm not ok
It failed

Je dessine un blanc ici. Toutes les idées?

Était-ce utile?

La solution

curl http://npmjs.org/install.sh | sudo sh

Il a besoin de sh que les autorisations, pas curl.

Autres conseils

This worked for me

git clone http://github.com/isaacs/npm.git
cd npm
sudo make install
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top