Installing the prepackaged Node.js distributions is the preferred installation method. However, installing Node.js from a source is desirable in a few situations:
- It can let you optimize the compiler settings as desired.
- It can let you cross-compile, say, for an embedded ARM system.
- You might need to keep multiple Node.js builds for testing.
- You might be working on Node.js itself.
Now that you have a high-level view, let's get our hands dirty by mucking around in some build scripts. The general process follows the usual configure, make, and make install routine that you may have already performed with other open source software packages. If not, don't worry, we'll guide you through the process.
The official installation instructions are in README.md, contained in the source distribution at https://github.com/nodejs/node/blob/master/README.md.
Installing prerequisites
There are three prerequisites: a C compiler, Python,...