나는 올해 나무 아래에 Raspberry Pi를 얻을만큼 운이 좋았고 장치에서 Node.js를 가지고 노는 것이 약간 재미있었습니다. 그러나 Node.js는 패키지를 풀다운하여 애플리케이션에 연결할 수있을 때 훨씬 더 흥미 롭습니다.
다음 명령으로 Node.js와 함께 NPM을 설치하려고하면 :
sudo apt-get install nodejs npm
다음과 같은 오류가 발생합니다.
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.
패키지 관리가 Debian 기반 Linux 운영 체제에서 작동하는 방식에 익숙하지 않으며 node.js 커뮤니티가 특정 패키지를 어떻게 구성했는지에 대해 전혀 모릅니다. node.js 자체를 설치하면 제대로 작동한다는 사실에 주목할 가치가 있습니다 .NPM을 단독으로 설치하려고하면 이것이 내가 얻는 것입니다.
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.
확실하지 않지만 내 직감은 node-semver
패키지 와 관련이 있다고 말합니다 . 나는 설치하는 경우 nodejs
자체 패키지를 다음 설치하려고 node-semver
이것이 내가 얻을 출력입니다.
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.
어떤 포인터?