In online articles, source code compilation is used to install node.js under Linux. In fact, node’s github has provided methods for installing node.js under each system using their own package managers.
1. In Ubuntu, use the following command:
If you need to use npm to install local components, you also need to execute the following command:
2. In Debian, use the following command:
If you need to use npm to install local components, you also need to execute the following command:
3. In RHEL, Fedora, CentOS, use the following command:
If you need to use npm to install local components, you also need to execute the following command:
However, in practice, in CentOS6, execute
An error will be reported without execution. You can also use npm.
4. In openSUSE and SLE, use the following command:
5. In Arch Linux, use the following command:
6. In FreeBSD and OpenBSD, use the following command:
The above is the entire content of this article, I hope you all like it.