Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Node on Centos 6.8

Tags:

node.js

centos

I'm trying to install nodejs on Centos 6.8 using these instrcutions:

http://tecadmin.net/install-latest-nodejs-and-npm-on-centos/#

When I run yum install nodejs

But I get the following errors

Resolving Dependencies
--> Running transaction check
---> Package nodejs.x86_64 0:5.12.0-1nodesource.el7.centos will be installed
--> Processing Dependency: libstdc++.so.6(GLIBCXX_3.4.15)(64bit) for package: nodejs-5.12.0-1nodesource.el7.centos.x86_64
--> Processing Dependency: libc.so.6(GLIBC_2.15)(64bit) for package: nodejs-5.12.0-1nodesource.el7.centos.x86_64
--> Finished Dependency Resolution
Error: Package: nodejs-5.12.0-1nodesource.el7.centos.x86_64 (nodesource)
       Requires: libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
Error: Package: nodejs-5.12.0-1nodesource.el7.centos.x86_64 (nodesource)
       Requires: libc.so.6(GLIBC_2.15)(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
like image 832
milky_jay Avatar asked Aug 19 '16 01:08

milky_jay


People also ask

Which module is used to manage node JS packages in CentOS 6?

First, we'll use npm, nodes' module manager, to install express middleware and supervisor - a helpful module that keeps our app started, monitors for file changes (ie.


3 Answers

Best way to install nodejs (latest version) on centos 7: (Make sure you are a sudo user)

  1. Open terminal and type: cd ~
  2. Then type: wget http://nodejs.org/dist/v10.15.1/node-v10.15.1-linux-x64.tar.gz (Must check the latest version change the version name accordingly)
  3. Then: sudo tar --strip-components 1 -xzvf node-v10.15.1-linux-x64.tar.gz -C /usr/local (Must check the latest version change the version name accordingly)
  4. Verify by using: node --version
like image 101
Viraj Khatri Avatar answered Oct 21 '22 14:10

Viraj Khatri


Try it before install:

yum clean all
rm -rf /var/cache/yum/*
yum update

my problem was in cached packages ...

like image 43
Mahdi Youseftabar Avatar answered Oct 21 '22 14:10

Mahdi Youseftabar


Maybe you'll need to install gcc-c++ and make before install nodejs using yum.

Try this:

$ yum install -y gcc-c++ make

$ curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash -

And then:

$ yum install nodejs

And confirm it using:

$ node -v

http://tecadmin.net/install-latest-nodejs-and-npm-on-centos/

like image 44
Clauber Stipkovic Avatar answered Oct 21 '22 14:10

Clauber Stipkovic