How To Install nodejs-bindings on CentOS 7
Introduction
In this tutorial we learn how to install nodejs-bindings
on CentOS 7.
What is nodejs-bindings
This is a helper module for authors of Node.js native addon modules. It is basically the “swiss army knife” of require()ing your native module’s .node file. Throughout the course of Node’s native addon history, addons have ended up being compiled in a variety of different places, depending on which build tool and which version of node was used. To make matters worse, now the gyp build tool can produce either a Release or Debug build, each being built into different locations. This module checks all the possible locations that a native addon would be built at, and returns the first one that loads successfully.
We can use yum
or dnf
to install nodejs-bindings
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install nodejs-bindings.
Install nodejs-bindings on CentOS 7 Using yum
Update yum database with yum
using the following command.
sudo yum makecache
After updating yum database, We can install nodejs-bindings
using yum
by running the following command:
sudo yum -y install nodejs-bindings
Install nodejs-bindings on CentOS 7 Using dnf
If you don’t have dnf installed you can install DNF on CentOS 7 first.
Update yum database with dnf
using the following command.
sudo dnf makecache
After updating yum database, We can install nodejs-bindings
using dnf
by running the following command:
sudo dnf -y install nodejs-bindings
How To Uninstall nodejs-bindings on CentOS 7
To uninstall only the nodejs-bindings
package we can use the following command:
sudo dnf remove nodejs-bindings
References
Summary
In this tutorial we learn how to install nodejs-bindings
on CentOS 7 using yum
and dnf
.