Đã thử cài đặt nodejs và npm trên Ubuntu 12.04. Tôi googled và làm điều đó. Bây giờ, tôi không thể cài đặt npm trên máy.
sudo apt-get install npm
Cái nào cho tôi cái này
The following packages have unmet dependencies:
npm : Depends: nodejs but it is not going to be installed
Depends: nodejs-dev
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.
apt-get install npm
phải tránh (!). Kiểm tra xemnpm -v
có ở đó trước để thử cài đặt không .... (đọc thêm bên dưới tại câu trả lời của @ MarcoCerpi)