Ubuntu 下安装 apt-get install npm 失败的解决方案

时间:2021-09-15 11:15:56
Ubuntu 下安装 apt-get  install npm 失败的解决方案:
sudo apt-get remove nodejs npm ## remove existing nodejs and npm packages
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup | sudo bash -
sudo apt-get install -y nodejs

from :http://askubuntu.com/questions/626383/node-package-manager-got-corrupted-in-some-way-now-it-cannot-be-installed