Why build Node from source on Linux?

71 views
Skip to first unread message

JamieP

unread,
Nov 5, 2015, 12:25:44 PM11/5/15
to nodejs
I want to install Node on Linux and am not sure whether to unpack the pre-built binary for Linux 64 or to build from source.

Can anyone brief me on the drivers behind building from source on the target machine as opposed to just unpacking a pre-built version?

cheers

Dave Finton

unread,
Nov 5, 2015, 2:51:06 PM11/5/15
to nod...@googlegroups.com
I don't know what version of Linux you're running, but prepacked version of node on Ubuntu are *very* out-of-date (I just checked my 15.04 installation and the version of node for that is still stuck at 0.10.25). By building from source, you can pick one of the latest versions (4.2.2 or 5.0.0). It's not too hard to build from source, either. I just install it in /usr/local/nodejs and make sure my paths are set up accordingly to make sure the "correct" version is always run first.

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+un...@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/3ef23a1e-aeeb-4a6a-96b0-535a9b2e97d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
David Finton

Jeremy Darling

unread,
Nov 5, 2015, 2:51:06 PM11/5/15
to nodejs
Personally, I prefer to install Node through NVM (https://github.com/creationix/nvm) for development environments.  For our stage, QA, and production environments we use the prebuilt image.

As for advantages, honestly, I can't find any unless you plan on working on the Node codebase yourself.

On Thu, Nov 5, 2015 at 10:50 AM, JamieP <jamiex...@gmail.com> wrote:

--

Vladimir Varankin

unread,
Nov 6, 2015, 12:20:27 AM11/6/15
to nodejs
We build our version of nodejs Debian packages internally as it gives us ability to specify installation path through the --prefix switch. All nodejs packages are installed to something like /opt/nodejs/<version>. With this scheme different apps can use different versions of node packages and be run on the same staging/production machines (note, this scheme was established internally long before the "containers era" became a mainstream ;)
Reply all
Reply to author
Forward
0 new messages