How To Install nodejs-nan on CentOS 7
Introduction
In this tutorial we learn how to install nodejs-nan
on CentOS 7.
What is nodejs-nan
A header file filled with macro and utility goodness for making add on development for Node.js easier across versions 0.8, 0.10 and 0.11, and eventually 0.12. Thanks to the crazy changes in V8 (and some in Node core), keeping native add-on compiling happily across versions, particularly 0.10 to 0.11/0.12, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js add-on without having to inspect NODE_MODULE_VERSION and get yourself into a macro-tangle.
We can use yum
or dnf
to install nodejs-nan
on CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install nodejs-nan.
Install nodejs-nan 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-nan
using yum
by running the following command:
sudo yum -y install nodejs-nan
Install nodejs-nan 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-nan
using dnf
by running the following command:
sudo dnf -y install nodejs-nan
How To Uninstall nodejs-nan on CentOS 7
To uninstall only the nodejs-nan
package we can use the following command:
sudo dnf remove nodejs-nan
References
Summary
In this tutorial we learn how to install nodejs-nan
on CentOS 7 using yum
and dnf
.