Installing node. js with NVM under CentOS 6

Source: Internet
Author: User
Tags install node

The version of GCC installed through Yum in CentOS 6 is 4.4.7, which will cause the compilation to fail when installing node. js with the release of the GCC version too low

warning:c++ compiler too old, need g++ 4.8 or clang++ 3.4 (cxx=g++)

In fact, not only is the GCC version too low, but it is also possible that the PY version is too low, or that Py cannot recognize the bz2 problem.

The best solution is to install node. js through NVM.

Install command (currently the latest version is 0.33.2, the latest version can be viewed here):

curl-o-https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash

Restart the shell after installation to view the NVM version with the following command:

NVM--version

View all node versions

NVM ls-remote

may be slow due to too many versions, for example, when the latest stable version of node is v6.10.2, install it with the following command

NVM Install v6.10.2

View the installed node version

Node--version
NPM--version

Toggle Node Version

NVM use v6.10.2

Set this version as the default

default v6.10.2

That's it.

Installing node. js with NVM under CentOS 6

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.