Ich hatte das Glück, dieses Jahr einen Raspberry Pi unter den Baum zu bekommen, und es hat mir ein bisschen Spaß gemacht, mit Node.js auf dem Gerät zu spielen. Node.js ist jedoch viel interessanter, wenn Sie Pakete herunterladen und in Ihre Anwendungen einbinden können - und hier habe ich einige Probleme.
Wenn ich versuche, NPM zusammen mit Node.js mit dem folgenden Befehl zu installieren:
sudo apt-get install nodejs npm
Ich erhalte folgenden Fehler:
pi@raspberrypi ~ $ sudo apt-get install nodejs npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
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 to resolve the situation:
The following packages have unmet dependencies:
nodejs : Breaks: npm (< 1.1.4~dfsg-2~) but 1.1.4~dfsg-1 is to be installed
npm : Depends: node-semver but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Ich bin ziemlich neu in der Funktionsweise der Paketverwaltung mit Debian-basierten Linux-Betriebssystemen und weiß überhaupt nicht viel darüber, wie die node.js-Community ihre spezifischen Pakete strukturiert hat. Es ist erwähnenswert, dass das Installieren von node.js für sich alleine gut funktioniert, und wenn ich versuche, NPM nur für sich alleine zu installieren, ist dies das, was ich bekomme.
pi@raspberrypi ~ $ sudo apt-get install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
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 to resolve the situation:
The following packages have unmet dependencies:
npm : Depends: nodejs but it is not going to be installed
Depends: nodejs-dev but it is not going to be installed
Depends: node-request but it is not going to be installed
Depends: node-mkdirp but it is not going to be installed
Depends: node-minimatch but it is not going to be installed
Depends: node-semver but it is not going to be installed
Depends: node-ini but it is not going to be installed
Depends: node-graceful-fs but it is not going to be installed
Depends: node-abbrev but it is not going to be installed
Depends: node-nopt but it is not going to be installed
Depends: node-fstream but it is not going to be installed
Depends: node-rimraf but it is not going to be installed
Depends: node-tar but it is not going to be installed
Depends: node-which but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Ich bin nicht sicher, aber mein Bauch sagt mir, dass es etwas mit dem node-semver
Paket zu tun hat . Wenn ich das nodejs
Paket selbst installiere und dann versuche, es zu installieren node-semver
, erhalte ich die Ausgabe.
pi@raspberrypi ~ $ sudo apt-get install node-semver
Reading package lists... Done
Building dependency tree
Reading state information... Done
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 to resolve the situation:
The following packages have unmet dependencies:
node-semver : Depends: nodejs but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Irgendwelche Hinweise?