Installing nodejs on Red Hat

Prachi g picture Prachi g · Jan 5, 2015 · Viewed 63.9k times · Source

I am trying to install node.js on Red Hat Enterprise Linux Server release 6.1 using the following command:

sudo yum install nodejs npm

I got the following error:

Error: Package: nodejs-0.10.24-1.el6.x86_64 (epel)
           Requires: libssl.so.10(libssl.so.10)(64bit)
Error: Package: nodejs-devel-0.10.24-1.el6.x86_64 (epel)
           Requires: libcrypto.so.10(libcrypto.so.10)(64bit)
Error: Package: nodejs-0.10.24-1.el6.x86_64 (epel)
           Requires: libcrypto.so.10(libcrypto.so.10)(64bit)
Error: Package: nodejs-devel-0.10.24-1.el6.x86_64 (epel)
           Requires: libssl.so.10(libssl.so.10)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

I tried the following command as well:

sudo yum install -y nodejs

I am getting the following error:

Error: Package: nodejs-0.10.24-1.el6.x86_64 (epel)
           Requires: libssl.so.10(libssl.so.10)(64bit)
Error: Package: nodejs-0.10.24-1.el6.x86_64 (epel)
           Requires: libcrypto.so.10(libcrypto.so.10)(64bit)

How should I install it? I want to install the latest version.

Answer

jfredys picture jfredys · Jan 13, 2015

NodeJS provides a setup script that must run before you install it with yum

curl -sL https://rpm.nodesource.com/setup | bash -

Then the yum command should work

yum install -y nodejs

https://github.com/joyent/node/wiki/installing-node.js-via-package-manager#enterprise-linux-and-fedora