How to install Nodejs 8 on Ubuntu 18.04
To install Node.js 8 on Ubuntu 18.04
Node.js is an open source, cross-platform runtime environment for developing server-side and networking applications. Node.js applications are written in JavaScript, and can be run within the Node.js runtime on mac os, Microsoft Windows, and Linux.Node.js also provides a rich library of various JavaScript modules which simplifies the development of web applications using Node.js to a great extent.
Installation
Update the repository. To update the repository files use the following command.
root@linuxhelp:~# apt update
Hit:1 https://deb.nodesource.com/node_8.x bionic InRelease
Hit:2 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:3 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:4 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
29 packages can be upgraded. Run 'apt list --upgradable' to see them.
Download the node packages. Use the Following command to download the node packages from the url.
root@linuxhelp:~# curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
##Installing the NodeSource Node.js 8.x LTS Carbon repo...
##Populating apt-get cache...
+ apt-get update
Hit:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 https://deb.nodesource.com/node_10.x bionic InRelease
Hit:3 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:4 http://security.ubuntu.com/ubuntu bionic-security InRelease
Hit:5 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease
Reading package lists... Done
.
.
.
##Run `sudo apt-get install -y nodejs` to install Node.js 8.x LTS Carbon and npm
##You may also need development tools to build native addons:
sudo apt-get install gcc g++ make
##To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install yarn
Install the node packages. You can use the following command to install the node packages.
root@linuxhelp:~# apt install nodejs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
nodejs
0 upgraded, 1 newly installed, 0 to remove and 29 not upgraded.
Need to get 13.5 MB of archives.
After this operation, 64.0 MB of additional disk space will be used.
Get:1 https://deb.nodesource.com/node_8.x bionic/main amd64 nodejs amd64 8.12.0-1nodesource1 [13.5 MB]
Fetched 13.5 MB in 18s (744 kB/s)
Selecting previously unselected package nodejs.
(Reading database ... 166393 files and directories currently installed.)
Preparing to unpack .../nodejs_8.12.0-1nodesource1_amd64.deb ...
Unpacking nodejs (8.12.0-1nodesource1) ...
Setting up nodejs (8.12.0-1nodesource1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Find the version of the node. To verify the version of the node use the Following command
[root@linuxhelp11 ~]# node -v
V8.12.0
With this The method to install Node.js 8 on ubuntu 18.04 comes to an end.
Comments ( 0 )
No comments available