I tried to install npm and I repeatedly got error that NPM depends on package node-gyp (>= 0.10.9) but that package is not installable.

I have no packages broken (I search for them using dpkg) but I still can not install NPM.

I can install just nodejs but I need also npm...

Can anyone help me?


2 Answers 2


Get it installed with these steps if the above comments methods doesn;t fly:

# For the soon to be LTS release, 10.x
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

# For the bleeding edge, 11.x
curl -sL https://deb.nodesource.com/setup_11.x | sudo -E bash -

Then install with sudo apt install nodejs.

  • Your welcome grateful to have been of help! Nov 23, 2018 at 20:35

Uninstall node and install it again with Node Version Manager(first install NVM,then with NVM node version you wish),on this way you will not have any problems with node-gyp or NPM .Good luck.

  • With NVM? When I tried apt-cache search nvm I got nothing.... Nov 22, 2018 at 16:41
  • Must install NVM first. Nov 22, 2018 at 16:42
  • No, I do not want another utility - I have these troubles on Ubuntu before and I forgot how to solve it - but it was definitively pure apt way - no other utilities. But thanks anyway. Nov 22, 2018 at 19:18
  • No problem,just trying to help. Nov 22, 2018 at 19:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .