If you want to install node. js >4.0 in CentOS 6, if you installed it in a previous way:
wget https://nodejs.org/dist/latest/node-v4.0.0.tar.xztar zvxf node-v4. 0.0. Tar . XZCD node-v4. 0.0 . /Configuremake&& make install
Will encounter error message:
4.8 3.4 (cxx=g++)
Tip To update the version of the C + + compiler, you can update it in the following ways:
sudo Curl http://Linuxsoft.cern.ch/cern/scl/slc6-scl.repo >/etc/yum.repos.d/ Slc6-scl.reposudo rpm--import http://ftp.mirrorservice.org/sites/ Ftp.scientificlinux.org/linux/scientific/51/i386/rpm-gpg-keys/rpm-gpg-key-cernsudoyum Install -y devtoolset-3
SCL Enable Devtoolset-3 Bash
After the update, again./configure and make && make install
Or you can follow the recommended installation methods on the node. JS Website:
Curl--silent--location https:///rpm.nodesource.com/setup | bash-yumInstall Nodejs
After successful pull
Yum Install GCC Make
Installing node. JS 4.0 or later in CentOS 6