Last active
April 17, 2024 14:50
-
-
Save zamantousif/0a89c56e06bd9087aa4908b2f5ce23ff to your computer and use it in GitHub Desktop.
Install/update nodejs npm using nodesource API on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Check the valid version to install as per your Ubuntu distribution on nodesource github | |
| # https://github.com/nodesource/distributions?tab=readme-ov-file#ubuntu-versions | |
| # Run below commands for installing latest available nodejs from nodesource ppa on Ubuntu 22.04 (latest at the time of writing) | |
| curl -fsSL https://deb.nodesource.com/setup_21.x | sudo -E bash - &&\ | |
| sudo apt-get install -y nodejs | |
| # If running into dpkg errors, follow the advice here https://github.com/nodesource/distributions/issues/1157#issuecomment-1605699451 | |
| # sudo dpkg --remove --force-remove-reinstreq libnode72:amd64 | |
| # sudo dpkg --remove --force-remove-reinstreq libnode-dev |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment