How to Install Bower using NPM on Rocky Linux 8.6
To install Bower using NPM on Rocky Linux 8.6
Introduction:
As websites are made of a lot of things like frameworks.libraries, assets, and utilities.
Bower manages all of these things. Bower is a package manager for web and dependency management tools that are built by Twitter. Bower oversees the front-end components like HTML, CSS, and JS. It reduces the time and energy you need to spend hunting around the web for libraries like Susy and jQuery. Bower helps you to install update or delete the libraries within a single command. Bower depends on nodejs and npm . Bower packages sometimes rely on git so ensure you installed it on your system.
Dependencies:
gcc-c++ make git
NodeJS latest version
Installation Procedure:
Step 1: Check OS version by using the below command
[root@linuxhelp ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="8.6 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.6"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.6 (Green Obsidian)"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
ROCKY_SUPPORT_PRODUCT="Rocky Linux"
ROCKY_SUPPORT_PRODUCT_VERSION="8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8"
Step 2:Install the dependencies that are required for nodejs by using the below command
[root@linuxhelp ~]# yum install git gcc-c++ make
Rocky Linux 8 - AppStream 5.3 kB/s | 4.8 kB 00:00
Rocky Linux 8 - AppStream 8.3 MB/s | 11 MB 00:01
Rocky Linux 8 - BaseOS 4.5 kB/s | 4.3 kB 00:00
Rocky Linux 8 - BaseOS 5.8 MB/s | 7.9 MB 00:01
Rocky Linux 8 - Extras 3.7 kB/s | 3.5 kB 00:00
Rocky Linux 8 - Extras 12 kB/s | 12 kB 00:01
Dependencies resolved.
=============================================================================================================
Package Architecture Version Repository Size
=============================================================================================================
Installing:
gcc-c++ x86_64 8.5.0-10.1.el8_6 appstream 12 M
git x86_64 2.31.1-2.el8 appstream 160 k
make x86_64 1:4.2.1-11.el8 baseos 497 k
Installing dependencies:
cpp x86_64 8.5.0-10.1.el8_6 appstream 10 M
gcc x86_64 8.5.0-10.1.el8_6 appstream 23 M
git-core x86_64 2.31.1-2.el8 appstream 4.7 M
git-core-doc noarch 2.31.1-2.el8 appstream 2.6 M
glibc-devel x86_64 2.28-189.5.el8_6 baseos 78 k
glibc-headers x86_64 2.28-189.5.el8_6 baseos 482 k
isl x86_64 0.16.1-6.el8 appstream 834 k
kernel-headers x86_64 4.18.0-372.26.1.el8_6 baseos 9.4 M
libstdc++-devel x86_64 8.5.0-10.1.el8_6 appstream 2.0 M
libxcrypt-devel x86_64 4.1.1-6.el8 baseos 24 k
perl-Error noarch 1:0.17025-2.el8 appstream 45 k
perl-Git noarch 2.31.1-2.el8 appstream 77 k
perl-TermReadKey x86_64 2.37-7.el8 appstream 39 k
Transaction Summary
=============================================================================================================
Install 16 Packages
Total download size: 67 M
Installed size: 179 M
Is this ok [y/N]: y
Downloading Packages:
(1/16): cpp-8.5.0-10.1.el8_6.x86_64.rpm 2.5 MB/s | 10 MB 00:04
(2/16): git-2.31.1-2.el8.x86_64.rpm 1.5 MB/s | 160 kB 00:00
(3/16): gcc-c++-8.5.0-10.1.el8_6.x86_64.rpm 1.9 MB/s | 12 MB 00:06
(4/16): git-core-2.31.1-2.el8.x86_64.rpm 1.5 MB/s | 4.7 MB 00:03
(5/16): git-core-doc-2.31.1-2.el8.noarch.rpm 2.0 MB/s | 2.6 MB 00:01
(6/16): isl-0.16.1-6.el8.x86_64.rpm 1.5 MB/s | 834 kB 00:00
(7/16): perl-Error-0.17025-2.el8.noarch.rpm 640 kB/s | 45 kB 00:00
(8/16): perl-Git-2.31.1-2.el8.noarch.rpm 863 kB/s | 77 kB 00:00
(9/16): perl-TermReadKey-2.37-7.el8.x86_64.rpm 637 kB/s | 39 kB 00:00
(10/16): glibc-devel-2.28-189.5.el8_6.x86_64.rpm 895 kB/s | 78 kB 00:00
(11/16): glibc-headers-2.28-189.5.el8_6.x86_64.rpm 1.3 MB/s | 482 kB 00:00
(12/16): libstdc++-devel-8.5.0-10.1.el8_6.x86_64.rpm 2.3 MB/s | 2.0 MB 00:00
(13/16): libxcrypt-devel-4.1.1-6.el8.x86_64.rpm 323 kB/s | 24 kB 00:00
(14/16): make-4.2.1-11.el8.x86_64.rpm 1.7 MB/s | 497 kB 00:00
(15/16): gcc-8.5.0-10.1.el8_6.x86_64.rpm 2.2 MB/s | 23 MB 00:10
(16/16): kernel-headers-4.18.0-372.26.1.el8_6.x86_64.rpm 3.0 MB/s | 9.4 MB 00:03
-------------------------------------------------------------------------------------------------------------
Total 5.1 MB/s | 67 MB 00:13
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : git-core-2.31.1-2.el8.x86_64 1/16
Installing : git-core-doc-2.31.1-2.el8.noarch 2/16
Verifying : make-1:4.2.1-11.el8.x86_64 16/16
Installed:
cpp-8.5.0-10.1.el8_6.x86_64 gcc-8.5.0-10.1.el8_6.x86_64
gcc-c++-8.5.0-10.1.el8_6.x86_64 git-2.31.1-2.el8.x86_64
git-core-2.31.1-2.el8.x86_64 git-core-doc-2.31.1-2.el8.noarch
glibc-devel-2.28-189.5.el8_6.x86_64 glibc-headers-2.28-189.5.el8_6.x86_64
isl-0.16.1-6.el8.x86_64 kernel-headers-4.18.0-372.26.1.el8_6.x86_64
libstdc++-devel-8.5.0-10.1.el8_6.x86_64 libxcrypt-devel-4.1.1-6.el8.x86_64
make-1:4.2.1-11.el8.x86_64 perl-Error-1:0.17025-2.el8.noarch
perl-Git-2.31.1-2.el8.noarch perl-TermReadKey-2.37-7.el8.x86_64
Complete!
Step 3:Download the latest node package manager by executing the below command
[root@linuxhelp ~]# curl -sL https://rpm.nodesource.com/setup_10.x | sudo -E bash -
================================================================================
================================================================================
DEPRECATION WARNING
Node.js 10.x is no longer actively supported!
You will not receive security or critical stability updates for this version.
You should migrate to a supported version of Node.js as soon as possible.
Use the installation script that corresponds to the version of Node.js you
wish to install. e.g.
* https://rpm.nodesource.com/setup_12.x - Node.js v12 LTS "Erbium"
* https://rpm.nodesource.com/setup_14.x - Node.js v14 LTS "Fermium" (recommended)
* https://rpm.nodesource.com/setup_16.x - Node.js v16 "Gallium"
Please see https://github.com/nodejs/Release for details about which
version may be appropriate for you.
The NodeSource Node.js distributions repository contains
information both about supported versions of Node.js and supported Linux
distributions. To learn more about usage, see the repository:
https://github.com/nodesource/distributions
================================================================================
================================================================================
Continuing in 20 seconds ...
## Installing the NodeSource Node.js 10.x repo...
## Inspecting system...
+ rpm -q --whatprovides redhat-release || rpm -q --whatprovides centos-release || rpm -q --whatprovides cloudlinux-release || rpm -q --whatprovides sl-release || rpm -q --whatprovides fedora-release
+ uname -m
## Confirming "el8-x86_64" is supported...
+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_10.x/el/8/x86_64/nodesource-release-el8-1.noarch.rpm'
## As yum will try to install Node.js from the AppStream repository
instead of the NodeSource repository, the AppStream's version of Node.js has to be disabled.
## Run `sudo yum module enable -y nodejs` to reactivate the AppStream's Node.js repository.
+ yum module disable -y nodejs
Last metadata expiration check: 0:01:21 ago on Tuesday 25 October 2022 10:54:31 PM IST.
Dependencies resolved.
=============================================================================================================
Package Architecture Version Repository Size
=============================================================================================================
Disabling modules:
nodejs
Transaction Summary
=============================================================================================================
Complete!
## Downloading release setup RPM...
+ mktemp
+ curl -sL -o '/tmp/tmp.EOHb2ntv4o' 'https://rpm.nodesource.com/pub_10.x/el/8/x86_64/nodesource-release-el8-1.noarch.rpm'
## Installing release setup RPM...
+ rpm -i --nosignature --force '/tmp/tmp.EOHb2ntv4o'
## Cleaning up...
+ rm -f '/tmp/tmp.EOHb2ntv4o'
## Checking for existing installations...
+ rpm -qa 'node|npm' | grep -v nodesource
## Run `sudo yum install -y nodejs` to install Node.js 10.x and npm.
## You may run dnf if yum is not available:
sudo dnf install -y nodejs
## You may also need development tools to build native addons:
sudo yum install gcc-c++ make
## To install the Yarn package manager, run:
curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
sudo yum install yarn
Step 4:Install node.js by executing the below command
[root@linuxhelp ~]# yum install nodejs
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/nodesource-el8.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/nodesource-el8.repo; Configuration: OptionBinding with id "failovermethod" does not exist
Node.js Packages for Enterprise Linux 8 - x86_64 1.9 MB/s | 490 kB 00:00
Dependencies resolved.
=============================================================================================================
Package Architecture Version Repository Size
=============================================================================================================
Installing:
nodejs x86_64 2:10.24.1-1nodesource nodesource 20 M
Transaction Summary
=============================================================================================================
Install 1 Package
Total download size: 20 M
Installed size: 60 M
Is this ok [y/N]: y
Downloading Packages:
nodejs-10.24.1-1nodesource.x86_64.rpm 46 MB/s | 20 MB 00:00
-------------------------------------------------------------------------------------------------------------
Total 46 MB/s | 20 MB 00:00
Node.js Packages for Enterprise Linux 8 - x86_64 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0x34FA74DD:
Userid : "NodeSource <gpg-rpm@nodesource.com>"
Fingerprint: 2E55 207A 95D9 944B 0CC9 3261 5DDB E8D4 34FA 74DD
From : /etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: nodejs-2:10.24.1-1nodesource.x86_64 1/1
Installing : nodejs-2:10.24.1-1nodesource.x86_64 1/1
Running scriptlet: nodejs-2:10.24.1-1nodesource.x86_64 1/1
Verifying : nodejs-2:10.24.1-1nodesource.x86_64 1/1
Installed:
nodejs-2:10.24.1-1nodesource.x86_64
Complete!
Step 5: Check the version of node by using the below command
[root@linuxhelp ~]# node -v
v10.24.1
Step 6:Verify the version of npm by executing the below command
[root@linuxhelp ~]# npm -v
6.14.12
Step 7:Install bower using npm by using the below command
[root@linuxhelp ~]# npm install -g bower
/usr/bin/bower -> /usr/lib/node_modules/bower/bin/bower
+ bower@1.8.14
added 1 package from 1 contributor in 3.07s
Step 8:Verify the version of bower by executing the below command
[root@linuxhelp ~]# bower --version
1.8.14
Conclusion:
We have reached the end of this article. In this guide, we have walked you through the steps required to Install Bower using NPM on Rocky Linux 8.6\Videos. Your feedback is much welcome.
Comments ( 0 )
No comments available