2

I am trying to install node package manager using $ sudo apt install npm and I'm getting an error Unable to correct problems, you have held broken packages. How can I fix this? Should I be worried?

Here is a complete log of the error

dave@dave-Latitude-5580:~$ sudo apt install npm
Reading package lists... Done
Building dependency tree... Done
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: node-agent-base but it is not going to be installed
       Depends: node-aproba but it is not going to be installed
       Depends: node-archy but it is not going to be installed
       Depends: node-cacache but it is not going to be installed
       Depends: node-chalk but it is not going to be installed
       Depends: node-cli-table3
       Depends: node-colors but it is not going to be installed
       Depends: node-columnify but it is not going to be installed
       Depends: node-debug but it is not going to be installed
       Depends: node-emoji-regex
       Depends: node-got but it is not going to be installed
       Depends: node-graceful-fs but it is not going to be installed
       Depends: node-gyp but it is not going to be installed
       Depends: node-https-proxy-agent but it is not going to be installed
       Depends: node-mkdirp but it is not going to be installed
       Depends: node-ms but it is not going to be installed
       Depends: node-nopt but it is not going to be installed
       Depends: node-normalize-package-data but it is not going to be installed
       Depends: node-npm-package-arg but it is not going to be installed
       Depends: node-npmlog but it is not going to be installed
       Depends: node-read-package-json but it is not going to be installed
       Depends: node-rimraf but it is not going to be installed
       Depends: node-semver but it is not going to be installed
       Depends: node-ssri but it is not going to be installed
       Depends: node-string-width but it is not going to be installed
       Depends: node-strip-ansi but it is not going to be installed
       Depends: node-tar but it is not going to be installed
       Depends: node-validate-npm-package-name but it is not going to be installed
       Depends: node-which but it is not going to be installed
       Depends: node-write-file-atomic but it is not going to be installed
       Depends: nodejs:any (>= 10)
       Recommends: node-tap but it is not going to be installed
E: Unable to correct problems, you have held broken packages.```
  • I am also interested. I checked https://stackoverflow.com/questions/26571326/how-do-i-resolve-the-following-packages-have-unmet-dependencies but it didn't help. Did you succeed? – Charaf Jul 21 '22 at 14:54
  • 1
    Hello, No i didn't. Instead i installed node version manager as it let me switch easily between the node versions. – David Clinton Jul 23 '22 at 04:47

0 Answers0