Reputation: 31
I've updated to the new Ubuntu 20.04LTS version and all my node installations have gone. So to install node I have tried the following 2 methods:
1.sudo apt update
sudo apt install nodejs npm
sudo apt install nodejs
While installing nodejs I'm getting the error : nodejs : Depends: python2-minimal but it is not installable . Unable to correct problems, you have held broken packages.
Upvotes: 3
Views: 2370
Reputation: 1
I had a similar problem and solved it by following the instructions on https://speedysense.com/install-nodejs-on-ubuntu-20-04/
Tldr run these on a terminal: for current LTS Release (v14.x),
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
Afterwards check your Nodejs and npm version by running these on a terminal:
node --version
npm --version
Upvotes: 0
Reputation: 51
You need to install python2. Steps in Ubuntu 20
sudo add-apt-repository universe
sudo apt-get update
sudo apt-get install python2
This will install python2 successfully. Now you can continue with normal nodejs installationUpvotes: 5