I am Hack Sparrow
Captain of the Internets.

Install Node.js on CentOS

How to install Node.js on CentOS

Installing Node.js on CentOS is slightly different from installing on Ubuntu Linux. The main differences being in the name of the package manager and the package names.

The package manager of CentOS is called Yum. Make sure a Cxx compiler and OpenSSL development packages are installed, else you will be stopped by these errors.

wscript:261: error: could not configure a cxx compiler!
wscript:372: error: Could not autodetect OpenSSL support. Make sure OpenSSL development packages are installed. Use configure --without-ssl to disable this message.

Important note: the libssl-dev package of Ubuntu is known as openssl-devel in CentOS.

The outlines of the installation process is shown below:

$ sudo yum install gcc-c++
$ sudo yum install openssl-devel
$ ./configure
$ make
$ sudo make install
'install' finished successfully (0.412s)

That's it! Once you see the "finished successfully" message, confirm Node is working on the box this way:

$ node -v

I hope that helped you with your Node.js installation on CentOS Linux. Personally I find CentOS a little difficult to deal with compared to Ubuntu. But hey, sometimes you have no choice over what you want. Any questions, queries; ping me in the comments.

11 Responses to “Install Node.js on CentOS”

  1. lucas branco says:

    thanks, CONGRATULATIONS!!! perfect !!!

Make a Comment