Install NodeJS on Ubuntu 20.04


Step 1:
sudo apt update

Step 2: Install NodeJS

apt-get install nodejs -y

Result:

root@tutorialspots:~# apt-get install nodejs -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libc-ares2 libnode64 nodejs-doc
Suggested packages:
  npm
The following NEW packages will be installed:
  libc-ares2 libnode64 nodejs nodejs-doc
0 upgraded, 4 newly installed, 0 to remove and 52 not upgraded.
Need to get 6,807 kB of archives.
After this operation, 30.7 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu focal-updates/main amd64 libc-ares2 amd64 1.15.0-1ubuntu0.1 [38.2 kB]
Get:2 http://archive.ubuntu.com/ubuntu focal/universe amd64 libnode64 amd64 10.19.0~dfsg-3ubuntu1 [5,765 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal/universe amd64 nodejs-doc all 10.19.0~dfsg-3ubuntu1 [942 kB]
Get:4 http://archive.ubuntu.com/ubuntu focal/universe amd64 nodejs amd64 10.19.0~dfsg-3ubuntu1 [61.1 kB]
Fetched 6,807 kB in 2s (3,703 kB/s)
Selecting previously unselected package libc-ares2:amd64.
(Reading database ... 116337 files and directories currently installed.)
Preparing to unpack .../libc-ares2_1.15.0-1ubuntu0.1_amd64.deb ...
Unpacking libc-ares2:amd64 (1.15.0-1ubuntu0.1) ...
Selecting previously unselected package libnode64:amd64.
Preparing to unpack .../libnode64_10.19.0~dfsg-3ubuntu1_amd64.deb ...
Unpacking libnode64:amd64 (10.19.0~dfsg-3ubuntu1) ...
Selecting previously unselected package nodejs-doc.
Preparing to unpack .../nodejs-doc_10.19.0~dfsg-3ubuntu1_all.deb ...
Unpacking nodejs-doc (10.19.0~dfsg-3ubuntu1) ...
Selecting previously unselected package nodejs.
Preparing to unpack .../nodejs_10.19.0~dfsg-3ubuntu1_amd64.deb ...
Unpacking nodejs (10.19.0~dfsg-3ubuntu1) ...
Setting up libc-ares2:amd64 (1.15.0-1ubuntu0.1) ...
Setting up libnode64:amd64 (10.19.0~dfsg-3ubuntu1) ...
Setting up nodejs-doc (10.19.0~dfsg-3ubuntu1) ...
Setting up nodejs (10.19.0~dfsg-3ubuntu1) ...
update-alternatives: using /usr/bin/nodejs to provide /usr/bin/js (js) in auto mode
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...
Processing triggers for man-db (2.9.1-1) ...

Step 3: install npm
apt-get install npm -y

Result:

...
Setting up node-path-exists (4.0.0-2) ...
Setting up libdrm-intel1:amd64 (2.4.105-3~20.04.2) ...
Setting up liblwp-mediatypes-perl (6.04-1) ...
Setting up node-qw (1.0.1-1) ...
Setting up node-tweetnacl (1.0.1+dfsg-2) ...
Setting up node-escape-string-regexp (1.0.5-1) ...
Setting up node-through (2.3.8-1) ...
Setting up node-genfun (5.0.0-1) ...
Setting up libxcb-shape0:amd64 (1.14-2) ...
Setting up x11-common (1:7.7+19ubuntu14) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up node-p-locate (2.0.0-1) ...
Setting up libtry-tiny-perl (0.30-1) ...
Setting up libsensors-config (1:3.6.0-2ubuntu1) ...
Setting up node-which-module (2.0.0-1) ...
Setting up node-decamelize (1.2.0-1) ...
Setting up libxxf86dga1:amd64 (2:1.1.5-0ubuntu1) ...
Setting up perl-openssl-defaults:amd64 (4) ...
Setting up node-ci-info (2.0.0-1) ...
Setting up node-aws-sign2 (0.7.1-2) ...
Setting up node-pseudomap (1.0.2-1) ...
Setting up node-color-name (1.1.3-1) ...
Setting up node-bluebird (3.5.1+dfsg2-2build1) ...
Setting up libencode-locale-perl (1.05-1) ...
Setting up node-console-control-strings (1.1.0-1) ...
Setting up libxcb-shm0:amd64 (1.14-2) ...
Setting up node-camelcase (5.3.1-1) ...
Setting up node-uuid (3.3.2-2) ...
Setting up node-extend (3.0.2-1) ...
Setting up node-jsonstream (1.3.5-1) ...
Setting up node-lazy-property (1.0.0-3) ...
Setting up node-minimist (1.2.5-1) ...
Setting up node-aws4 (1.9.0-1) ...
Setting up node-yargs-parser (18.1.1-1) ...
Setting up node-prepend-http (2.0.0-1) ...
Setting up node-typedarray (0.0.6-1) ...
Setting up node-dashdash (1.14.1-2) ...
Setting up node-function-bind (1.1.1+repack-1) ...
Setting up libxxf86vm1:amd64 (1:1.1.4-1build1) ...
Setting up node-clone (2.1.2-1) ...
Setting up node-iferr (1.0.2-1) ...
Setting up node-chownr (1.1.3-3) ...
Setting up node-has-flag (4.0.0-1) ...
Setting up node-validate-npm-package-name (3.0.0-1) ...
Setting up node-os-tmpdir (1.0.2-1) ...
Setting up libpython2.7-stdlib:amd64 (2.7.18-1~20.04.1) ...
Setting up libxcb-present0:amd64 (1.14-2) ...
Setting up node-lodash-packages (4.17.15+dfsg-2) ...
Setting up libjs-psl (1.7.0+ds-1) ...
Setting up node-json-schema-traverse (0.3.1-1) ...
Setting up node-asap (2.0.6-2) ...
Setting up node-mime (2.4.4+dfsg-1) ...
Setting up node-inherits (2.0.4-1) ...
Setting up node-builtin-modules (3.1.0-1) ...
Setting up node-path-is-absolute (2.0.0-1) ...
Setting up node-locate-path (5.0.0-2) ...
Setting up node-ini (1.3.5-1) ...
Setting up node-iconv-lite (0.4.23-1) ...
Setting up libfontenc1:amd64 (1:1.1.4-0ubuntu1) ...
Setting up node-is-npm (1.0.0-1) ...
Setting up node-ecc-jsbn (0.2.0-2) ...
Setting up node-safe-buffer (5.2.0-1) ...
Setting up node-promise-inflight (1.0.1-1) ...
Setting up node-combined-stream (1.0.8-1) ...
Setting up node-json-stringify-safe (5.0.1+repack-2) ...
Setting up node-json-parse-better-errors (1.0.2-2) ...
Setting up node-strict-uri-encode (2.0.0-1) ...
Setting up node-y18n (4.0.0-2) ...
Setting up node-detect-newline (2.1.0-1) ...
Setting up node-fast-deep-equal (1.1.0-1) ...
Setting up node-shebang-regex (2.0.0-1) ...
Setting up node-har-schema (2.0.0-3) ...
Setting up node-mime-types (2.1.25-1) ...
Setting up node-performance-now (2.1.0+debian-1) ...
Setting up node-err-code (2.0.0+dfsg-1) ...
Setting up libdata-dump-perl (1.23-1) ...
Setting up node-resolve-from (4.0.0-1) ...
Setting up libxfixes3:amd64 (1:5.0.3-2) ...
Setting up libxcb-sync1:amd64 (1.14-2) ...
Setting up libipc-system-simple-perl (1.26-1) ...
Setting up node-balanced-match (1.0.0-1) ...
Setting up libxml-xpathengine-perl (0.14-1) ...
Setting up node-ansi (0.3.1-1) ...
Setting up node-brace-expansion (1.1.11-1) ...
Setting up node-is-object (1.0.1-1) ...
Setting up libllvm12:amd64 (1:12.0.0-3ubuntu1~20.04.4) ...
Setting up node-is-stream (1.1.0-1) ...
Setting up node-spdx-exceptions (2.2.0-1) ...
Setting up node-deep-extend (0.6.0-1) ...
Setting up node-p-finally (1.0.0-2) ...
Setting up libxinerama1:amd64 (2:1.1.4-2) ...
Setting up node-strip-ansi (6.0.0-2) ...
Setting up node-set-blocking (2.0.0-1) ...
Setting up node-prr (1.0.1-1) ...
Setting up libxv1:amd64 (2:1.0.11-1) ...
Setting up node-tunnel-agent (0.6.1-2) ...
Setting up libio-html-perl (1.001-1) ...
Setting up node-npm-bundled (1.1.1-1) ...
Setting up libxrandr2:amd64 (2:1.5.2-0ubuntu1) ...
Setting up node-uid-number (0.0.6-1ubuntu0.20.04.1) ...
Setting up node-signal-exit (3.0.2-1) ...
Setting up node-cyclist (1.0.1-2) ...
Setting up libsensors5:amd64 (1:3.6.0-2ubuntu1) ...
Setting up node-which (2.0.2-1) ...
Setting up node-lcid (1.0.0-1) ...
Setting up node-wrappy (1.0.2-1) ...
Setting up libglapi-mesa:amd64 (21.0.3-0ubuntu0.3~20.04.3) ...
Setting up node-text-table (0.2.0-2) ...
Setting up node-asynckit (0.4.0-3) ...
Setting up node-proto-list (1.2.4-1) ...
Setting up libvulkan1:amd64 (1.2.131.2-1) ...
Setting up node-require-directory (2.1.1-1) ...
Setting up node-ip (1.1.5-5) ...
Setting up node-dot-prop (5.2.0-1) ...
Setting up node-punycode (2.1.1-3) ...
Setting up libtimedate-perl (2.3200-1) ...
Setting up node-concat-stream (1.6.2-1) ...
Setting up libxcb-dri2-0:amd64 (1.14-2) ...
Setting up node-defaults (1.0.3-1) ...
Setting up node-mute-stream (0.0.8-2) ...
Setting up node-mimic-response (2.1.0-1) ...
Setting up node-duplexer3 (0.1.4-5) ...
Setting up node-stream-iterate (1.2.0-4) ...
Setting up node-number-is-nan (2.0.0-1) ...
Setting up node-graceful-fs (4.2.3-2) ...
Setting up libxshmfence1:amd64 (1.3-1) ...
Setting up libxcb-randr0:amd64 (1.14-2) ...
Setting up node-jsonify (0.0.0-1) ...
Setting up node-json-stable-stringify (1.0.1-1) ...
Setting up node-hosted-git-info (2.8.5-1) ...
Setting up node-aproba (2.0.0-1) ...
Setting up node-mimic-fn (3.0.0-1) ...
Setting up node-ip-regex (4.1.0-2) ...
Setting up node-rc (1.2.8-1) ...
Setting up node-crypto-random-string (1.0.0-1) ...
Setting up node-spdx-license-ids (3.0.5-1) ...
Setting up node-string-decoder (1.2.0-2) ...
Setting up node-is-path-inside (1.0.1-1) ...
Setting up node-mkdirp (0.5.1-2) ...
Setting up node-run-queue (1.0.3-1) ...
Setting up node-call-limit (1.1.1-1) ...
Setting up node-core-util-is (1.0.2-1) ...
Setting up node-json-schema (0.2.3-1) ...
Setting up node-uri-js (4.2.2+dfsg-5) ...
Setting up node-minimatch (3.0.4-4) ...
Setting up libxkbfile1:amd64 (1:1.1.0-1) ...
Setting up node-cli-boxes (2.2.0-2) ...
Setting up node-archy (1.0.0-3) ...
Setting up node-caseless (0.12.0-1) ...
Setting up node-imurmurhash (0.1.4-1) ...
Setting up node-xtend (4.0.2-1) ...
Setting up node-p-timeout (1.2.0-1) ...
Setting up node-verror (1.10.0-1) ...
Setting up node-getpass (0.1.7-1) ...
Setting up node-encoding (0.1.12-3) ...
Setting up node-config-chain (1.1.12-1) ...
Setting up node-read (1.0.7-2) ...
Setting up node-detect-indent (5.0.0-1) ...
Setting up node-nopt (3.0.6-4) ...
Setting up libxcomposite1:amd64 (1:0.4.5-1) ...
Setting up node-npm-run-path (2.0.2-2) ...
Setting up node-asn1 (0.2.3-2) ...
Setting up node-has-symbol-support-x (1.4.1+dfsg-1) ...
Setting up node-sorted-object (2.0.1-1) ...
Setting up xdg-utils (1.1.3-2ubuntu1.20.04.2) ...
Setting up node-color-convert (1.9.3-1) ...
Setting up node-lodash (4.17.15+dfsg-2) ...
Setting up liburi-perl (1.76-2) ...
Setting up libx11-protocol-perl (0.56-7) ...
Setting up node-isarray (2.0.5-1) ...
Setting up node-osenv (0.1.5-1) ...
Setting up node-is-plain-obj (1.1.0-1) ...
Setting up node-ms (2.1.1-1) ...
Setting up node-shebang-command (1.2.0-1) ...
Setting up libjs-is-typedarray (1.0.0-2) ...
Setting up libdrm-amdgpu1:amd64 (2.4.105-3~20.04.2) ...
Setting up node-lowercase-keys (2.0.0-1) ...
Setting up node-decompress-response (3.3.0-1) ...
Setting up node-es6-promise (4.2.8-6) ...
Setting up node-strip-eof (1.0.0-2) ...
Setting up node-process-nextick-args (2.0.0-1) ...
Setting up node-semver (7.1.3-1) ...
Setting up node-has-unicode (2.0.1-2) ...
Setting up node-fs-write-stream-atomic (1.0.10-4) ...
Setting up libwayland-client0:amd64 (1.18.0-1) ...
Setting up libnet-ssleay-perl (1.88-2ubuntu1) ...
Setting up mesa-vulkan-drivers:amd64 (21.0.3-0ubuntu0.3~20.04.3) ...
Setting up node-readable-stream (3.4.0-2) ...
Setting up node-ssri (7.1.0-2) ...
Setting up node-through2 (3.0.1-2) ...
Setting up libice6:amd64 (2:1.0.10-0ubuntu1) ...
Setting up libhttp-date-perl (6.05-1) ...
Setting up node-lru-cache (5.1.1-5) ...
Setting up node-bcrypt-pbkdf (1.0.2-1) ...
Setting up libxft2:amd64 (2.3.3-0ubuntu1) ...
Setting up node-promise-retry (1.1.1-4) ...
Setting up node-mem (1.1.0-1) ...
Setting up libfile-basedir-perl (0.08-1) ...
Setting up node-supports-color (6.1.0-2) ...
Setting up libfile-listing-perl (6.04-1) ...
Setting up node-define-properties (1.1.3-1) ...
Setting up python2.7 (2.7.18-1~20.04.1) ...
Setting up node-once (1.4.0-3) ...
Setting up node-psl (1.7.0+ds-1) ...
Setting up libpython2-stdlib:amd64 (2.7.17-2ubuntu4) ...
Setting up node-jsprim (1.4.1-1) ...
Setting up node-sha (3.0.0-1) ...
Setting up node-url-parse-lax (1.0.0-1) ...
Setting up libxtst6:amd64 (2:1.2.3-1) ...
Setting up node-flush-write-stream (2.0.0-2) ...
Setting up libxcursor1:amd64 (1:1.2.0-2) ...
Setting up node-ajv (6.10.2-1) ...
Setting up libgl1-mesa-dri:amd64 (21.0.3-0ubuntu0.3~20.04.3) ...
Setting up node-are-we-there-yet (1.1.5-1) ...
Setting up node-errno (0.1.7-1) ...
Setting up node-find-up (4.1.0-2) ...
Setting up libnet-http-perl (6.19-1) ...
Setting up node-semver-diff (2.1.0-2) ...
Setting up node-unique-string (1.0.0-1) ...
Setting up node-debug (4.1.1-2) ...
Setting up node-from2 (2.3.0-1) ...
Setting up python2 (2.7.17-2ubuntu4) ...
Setting up node-make-dir (3.0.2-1) ...
Setting up node-promzard (0.3.0-1) ...
Setting up node-wcwidth.js (1.0.0-1) ...
Setting up node-unique-filename (1.1.1+ds-1) ...
Setting up node-cross-spawn (5.1.0-2) ...
Setting up node-ansi-styles (4.2.1-1) ...
Setting up node-form-data (3.0.0-2) ...
Setting up node-lockfile (1.0.4-3) ...
Setting up node-chalk (2.4.2-1) ...
Setting up node-spdx-expression-parse (3.0.0-1) ...
Setting up node-parallel-transform (1.1.0-2) ...
Setting up libfile-desktopentry-perl (0.22-1) ...
Setting up node-registry-url (3.1.0-1) ...
Setting up node-is-typedarray (1.0.0-2) ...
Setting up libwww-robotrules-perl (6.02-1) ...
Setting up libjs-typedarray-to-buffer (3.0.3-3) ...
Setting up node-registry-auth-token (3.3.1-1) ...
Setting up node-tar (4.4.10+ds1-2ubuntu1) ...
Setting up node-inflight (1.0.6-1) ...
Setting up libhtml-parser-perl (3.72-5) ...
Setting up node-has-to-string-tag-x (1.4.1+dfsg-1) ...
Setting up node-tough-cookie (3.0.0-1) ...
Setting up node-npm-package-arg (6.1.1-1) ...
Setting up node-opener (1.5.1-1) ...
Setting up node-isurl (4.0.1-2) ...
Setting up libsm6:amd64 (2:1.2.3-1) ...
Setting up libio-socket-ssl-perl (2.067-1) ...
Setting up node-string-width (2.1.1-1) ...
Setting up libhttp-message-perl (6.22-1) ...
Setting up node-sshpk (1.16.1+dfsg-2) ...
Setting up libhtml-form-perl (6.07-1) ...
Setting up node-bl (4.0.0-2) ...
Setting up node-har-validator (5.1.3-1) ...
Setting up libfile-mimeinfo-perl (0.29-1) ...
Setting up libhttp-negotiate-perl (6.01-1) ...
Setting up libglx-mesa0:amd64 (21.0.3-0ubuntu0.3~20.04.3) ...
Setting up node-end-of-stream (1.4.4-1) ...
Setting up node-pump (3.0.0-2) ...
Setting up libglx0:amd64 (1.3.2-1~ubuntu0.20.04.1) ...
Setting up node-columnify (1.5.4-1) ...
Setting up libhttp-cookies-perl (6.08-1) ...
Setting up python-pkg-resources (44.0.0-2) ...
Setting up libhtml-tree-perl (5.07-2) ...
Setting up libhtml-format-perl (2.12-1) ...
Setting up node-http-signature (1.3.2-1) ...
Setting up node-duplexify (4.1.1-1) ...
Setting up node-spdx-correct (3.1.0-1) ...
Setting up libgl1:amd64 (1.3.2-1~ubuntu0.20.04.1) ...
Setting up node-wrap-ansi (4.0.0-2) ...
Setting up libnet-smtp-ssl-perl (1.04-1) ...
Setting up node-glob (7.1.6-1) ...
Setting up libmailtools-perl (2.21-1) ...
Setting up node-get-stream (4.1.0-1) ...
Setting up node-pumpify (2.0.1-1) ...
Setting up node-widest-line (3.1.0-1) ...
Setting up node-got (7.1.0-1) ...
Setting up libxt6:amd64 (1:1.1.5-1) ...
Setting up node-typedarray-to-buffer (3.0.3-3) ...
Setting up node-package-json (4.0.1-1) ...
Setting up libhttp-daemon-perl (6.06-1) ...
Setting up node-latest-version (3.1.0-1) ...
Setting up node-wide-align (1.1.3-1) ...
Setting up node-ansi-align (3.0.0-1) ...
Setting up node-request (2.88.1-4) ...
Setting up node-cliui (4.1.0-2) ...
Setting up node-rimraf (2.6.3-1) ...
Setting up gyp (0.1+20180428git4d467626-3ubuntu1) ...
Setting up node-validate-npm-package-license (3.0.4-1) ...
Setting up node-stream-each (1.2.3-1) ...
Setting up node-mississippi (3.0.0-1) ...
Setting up libxmu6:amd64 (2:1.1.3-0ubuntu1) ...
Setting up node-execa (0.10.0+dfsg-1) ...
Setting up node-write-file-atomic (3.0.3-1) ...
Setting up node-copy-concurrently (1.0.5-4) ...
Setting up node-move-concurrently (1.0.1-2) ...
Setting up libxaw7:amd64 (2:1.0.13-1) ...
Setting up node-term-size (1.2.0+dfsg-2) ...
Setting up node-os-locale (4.0.0-1) ...
Setting up x11-xserver-utils (7.7+8) ...
Setting up node-fs-vacuum (1.2.10-3) ...
Setting up node-gauge (2.7.4-1) ...
Setting up node-normalize-package-data (2.5.0-1) ...
Setting up node-configstore (5.0.1-1) ...
Setting up node-boxen (4.2.0-2) ...
Setting up x11-utils (7.7+5) ...
Setting up node-npmlog (4.1.2-2) ...
Setting up node-yargs (15.3.0-1) ...
Setting up node-cacache (11.3.3-2) ...
Setting up node-read-package-json (2.1.1-1) ...
Setting up node-gyp (6.1.0-3) ...
Setting up node-libnpx (10.2.1-2) ...
Setting up npm (6.14.4+ds-1ubuntu2) ...
Setting up libwww-perl (6.43-1) ...
Setting up liblwp-protocol-https-perl (6.07-2ubuntu2) ...
Setting up libxml-parser-perl (2.46-1) ...
Setting up libxml-twig-perl (1:3.50-2) ...
Setting up libnet-dbus-perl (1.2.0-1) ...
Processing triggers for systemd (245.4-4ubuntu3.11) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...

Leave a Reply