Então eu tentei me consertar por algumas horas e sinto que piorou. Eu estou executando o Kbuntu 12.10, e tentando instalar o nodejs e o npm como um usuário que não é root, então eu posso instalar a estrutura de fechamento do jogo. Eu tinha uma versão do nó e npm instalado como root. Em seguida, tentei instalá-lo novamente (sem remover o antigo) através destas instruções: link
Agora, quando digito which npm
, não recebo nada. No entanto, quando digito which node
i recebo /home/myusername/.local/bin/node
. Então, estou assumindo que o nó está instalado corretamente.
também quando digito npm -v
Eu recebo:
The program 'npm' is currently not installed. You can install it by typing:
sudo apt-get install npm
Então eu digito sudo apt-get install npm
e a resposta é:
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 (>= 0.6.19~dfsg1-3) but it is not going to be installed
Depends: nodejs-dev
Depends: node-node-uuid 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.
Como posso corrigir isso para que eu possa instalar o npm de acordo com o link acima?
EDIT: depois de pesquisar mais eu tentei sudo apt-get clean && sudo apt-get update
e mesmo depois disso eu ainda recebo a mesma mensagem depois de tentar apt-get npm