Use the package manager in linux to install node. js_node.js

Source: Internet
Author: User
Tags install node arch linux nodesource
This article mainly introduces how to use the package manager to install node. js in linux and the specific installation process. it is very detailed and recommended to you. if you need it, refer to it. In the online article, install node in linux. js uses Source Code Compilation. In fact, the node package manager has been provided on github to install node in various systems. js method.

1. in Ubuntu, run the following command:

The code is as follows:


Curl-sL https://deb.nodesource.com/setup | sudo bash-
Sudo apt-get install-y nodejs

To install the local component using npm, run the following command:

The code is as follows:


Apt-get install-y build-essential

2. in Debian, run the following command:

The code is as follows:


Apt-get install curl
Curl-sL https://deb.nodesource.com/setup | bash-
Apt-get install-y nodejs

To install the local component using npm, run the following command:

The code is as follows:


Apt-get install-y build-essential

3. in RHEL, Fedora, and CentOS, run the following command:

The code is as follows:


Curl-sL https://rpm.nodesource.com/setup | bash-
Yum install-y nodejs

To install the local component using npm, run the following command:

The code is as follows:


Yum groupinstall 'development tool'
# The following line is executed in Fedora.
Sudo yum install nodejs npm
# The following line is executed in RHEL and CentOS.
Sudo yum install nodejs npm -- enablerepo = epel

However, in CentOS6

The code is as follows:


Sudo yum install nodejs npm -- enablerepo = epel

An error is reported, but not executed. you can also use npm.

4. use the following command in openSUSE and lupus erythematosus:

The code is as follows:


Sudo zypper ar \
Http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1 \
Node. js
Sudo zypper in nodejs-devel

5. in Arch Linux, run the following command:

The code is as follows:


Pacman-S nodejs

6. in FreeBSD and OpenBSD, run the following command:

The code is as follows:


/Usr/ports/www/node
Cd/usr/ports/www/node-devel/& make install clean
# Or
Pkg_add-r node-devel
Pkg install node
# Or
Pkg install node-devel

The above is all the content of this article. I hope you will like it.

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.