How to install nodeJS in unsupported Linux Mint distro
As a modern-day javascript developer, when setting up your development environment for the first time on your new Linux mint OS installation, the usual first item to cross in your itinerary is the installation of NodeJS which is javascript’s implementation for a server runtime engine.
Using nodesource is the recommended way to get the latest official release or LTS release. Unfortunately, following the normal installation command steps may get you this error
Your distribution, identified as “tina”, is not currently supported,
please contact NodeSource at
https://github.com/nodesource/distributions/issues
if you think this is incorrect or would like your distribution to be
considered for support
This error is because nodesource setup file has a list of supported Linux distributions it has been tested to support and chances are that the copy of Linux distribution you are using is one of the latest versions yet to be supported by nodesource.
The following installation steps has a fix to help you successfully install NodeJS.
Note
- this example is for Linux Mint tina (19.2) distribution, replace parameters where needed.
- setup_12.x can also be setup_10.x depending on your preferred release version
sudo apt-get install python-software-properties
Download the setup script using wget
wget https://deb.nodesource.com/setup_12.x
Open the setup script with
sudo nano setup_12.x
Scroll about midway down the setup script where the list of supported linux distros are listed, add this line after the Linux mint grouping definitions
check_alt "Linux Mint" "tina" "Ubuntu" "bionic"
Save the setup script and make it executable
sudo chmod +x setup_12.x
Finally, run install
sudo apt-get install -y nodejs