How to install nodejs 5.3 on Centos 6.6
How to install nodejs 5.3 on Centos 6.6
Check OS version :
# cat /etc/redhat-release
CentOS release 6.6
CentOS release 6.6
Download latest nodejs
# wget https://nodejs.org/dist/v5.3.0/node-v5.3.0.tar.gz
Extract and compile
# tar -xzvf node-v5.3.0.tar.gz
# cd node-v5.3.0
# ./configure
# cd node-v5.3.0
# ./configure
Error came
WARNING: failed to autodetect C++ compiler version (CXX=g++)
WARNING: failed to autodetect C compiler version (CC=gcc)
Node.js configure error: No acceptable C compiler found!
WARNING: failed to autodetect C compiler version (CC=gcc)
Node.js configure error: No acceptable C compiler found!
# yum groupinstall 'Development Tools'
Then try to compile it again
# ./configure
Common error came while compiling latest nodejs with old version of C compiler
Upgrade our compiler to compile latest nodejs
# curl http://linuxsoft.cern.ch/cern/scl/slc6-scl.repo > /etc/yum.repos.d/slc6-scl.repo
# rpm --import http://ftp.mirrorservice.org/sites/ftp.scientificlinux.org/linux/scientific/51/i386/RPM- GPG-KEYs/RPM-GPG-KEY-cern
# yum install -y devtoolset-3
# scl enable devtoolset-3 bash
# ./configure
# make && make install
It takes time to compile and build nodejs. After installation check node -v and npm -v
How to install nodejs 5.3 on Centos 6.6
Reviewed by vivek sathisan
on
12:32
Rating:

No comments: