Score:0

Install npm - Depends: node-gyp (>= 0.10.9) but it is not going to be installed

mx flag

I am using Ubuntu 18.04.5 LTS and want to install npm. I have successfully installed node, but struggle to install npm

I tried the following:

admin@admin-VirtualBox:~/$ sudo apt 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: node-gyp (>= 0.10.9) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
admin@admin-VirtualBox:~/$ sudo apt-get install nodejs-dev node-gyp libssl1.0-dev
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:
 libssl1.0-dev : Depends: libssl1.0.0 (= 1.0.2n-1ubuntu5) but 1.0.2n-1ubuntu5.3 is to be installed
 node-gyp : Depends: gyp (>= 0.1+20150913git1f374df9) but it is not going to be installed
 nodejs-dev : Depends: python but it is not going to be installed
              Depends: libssl-dev (>= 1.0.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
admin@admin-VirtualBox:~/$ sudo apt install python
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:
 python : PreDepends: python-minimal (= 2.7.15~rc1-1) but it is not going to be installed
          Depends: python2.7 (>= 2.7.15~rc1-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
admin@admin-VirtualBox:~/$ node --version
v8.10.0

Any suggestions how to install node-gyp?

I appreciate your replies!

guiverc avatar
cn flag
Does this answer your question? [Unable to correct problems, you have held broken packages](https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.