I was able to install it following the instructions I found here:
https://askubuntu.com/questions/899756/cant-install-npm-unable-to-
correct-problems-you-have-held-broken-packages

That is, I run

sudo apt install libssl1.0-dev
sudo apt install nodejs-dev
sudo apt install node-gyp
sudo apt install npm

in that order and it installed correctly. 
I am now unable to reproduce it too. Even after reverting the instructions I 
followed, npm installs correctly. I did

sudo apt remove --purge --assume-yes npm 
sudo apt remove --purge --assume-yes node-gyp
sudo apt remove --purge --assume-yes nodejs-dev
sudo apt remove --purge --assume-yes libssl1.0-dev
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get install -f
sudo apt-get  --assume-yes autoremove

and then `sudo apt-get install npm` successfully installed it

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1809828

Title:
  Cannot install the npm package: dependency broken

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/npm/+bug/1809828/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to