Je ne suis pas très habile donc garder avec moi ...Problèmes avec l'installation sous Linux nœud/en cours d'exécution NPM installer
Je suis en train d'installer Node.js en suivant ces instructions:
sudo apt-get update
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs=0.10.18-1chl1~precise1
qui sont trouvé ici: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
j'ai couru ces commandes et après la dernière commande, j'ai reçu cette erreur:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help resolve the situation:
The following packages have unmet dependencies:
nodejs : Conflicts: npm
E: Unable to correct problems, you have held broken packages.
J'ai ensuite essayé d'exécuter la commande sudo apt-get install nodejs qui ne m'a donné aucune erreur.
Cependant, quand je lance « NPM installer » il ne parvient présenter ceci:
npm ERR! install Couldn't read dependencies
npm ERR! Error: ENOENT, open '/home/sarah/package.json'
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.8.0-30-generic
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
npm ERR! cwd /home/sarah
npm ERR! node -v v0.11.8-pre
npm ERR! npm -v 1.3.11
npm ERR! path /home/sarah/package.json
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /home/sarah/npm-debug.log
npm ERR! not ok code 0
Quelqu'un peut-il me aider à comprendre ce qui se passe mal? Merci d'avance
Avez-vous par hasard déjà installé NPM? Avez-vous envisagé d'installer l'archive tar binaire? – Brad
Je ne sais même pas que c'est – Sarah
Je pense que vous feriez mieux d'installer le nœud via [https://github.com/creationix/nvm](nvm) à la place des binaires. – Sriharsha