One-liner to install all needed dependencies(curl and git are not really needed, but are very useful and also needed if you install via nvm).

sudo apt-get install build-essential libssl-dev curl git-core

Last two dependencies are not always needed, but installing them is really usefull anyway and you probably need it later anyway.

To only install cxx compiler

sudo apt-get install build-essential

If openssl is missing

sudo apt-get install libssl-dev
Answer from Alfred on Stack Overflow
🌐
GitHub
gist.github.com › leommoore › 4420651
Installing and Compiling Node.js · GitHub
###Ubuntu · sudo apt-get install g++ libssl-dev apache2-utils curl make libkrb5-dev · ###Compiling · sudo apt-get update sudo apt-get install -y python-software-properties g++ make mkdir /usr/src/node && cd $_ #wget -N http://nodejs.org/dist/node-latest.tar.gz wget -N http://nodejs.org/dist/v6.7.0/node-v6.7.0.tar.gz #tar xzvf node-latest.tar.gz && cd `ls -rd node-v*` tar xzvf node-v6.7.0.tar.gz && cd `ls -rd node-v*` #cd node-latest cd node-v6.7.0 sudo ./configure sudo make install ·
🌐
Rheinwerk Computing
blog.rheinwerk-computing.com › how-to-compile-nodejs-from-source-a-step-by-step-guide-for-ubuntu
How to Compile Node.js from Source: A Step-by-Step Guide for Ubuntu
April 24, 2025 - By default, this isn’t the case with the desktop variant of Ubuntu. However, you can install the compiler via the system’s package manager, as shown in this code. ... Once this requirement is met, you can unpack the source code package and go to the resulting directory, as shown here. ... The first step of the actual compilation process consists of creating a makefile. This file will later serve as the basis for the make command to compile Node.js.
🌐
GitHub
github.com › lastmjs › node-compiler
GitHub - lastmjs/node-compiler: Ahead-of-time (AOT) Compiler designed for Node.js, that just works.
AppImage supports only Linux with a kernel that supports SquashFS, while Node.js Compiler supports all three platforms of Linux, macOS and Windows, meanwhile without any special feature requirements from the kernel.
Starred by 28 users
Forked by 2 users
Languages   C++ 49.2% | C 21.3% | Assembly 10.2% | JavaScript 7.1% | HTML 4.7% | Perl 3.0%
🌐
Ubuntu
manpages.ubuntu.com › manpages › bionic › man1 › buble.1.html
Ubuntu Manpage: Bublé - Fast ES2015 compiler for Node.js
# Compile input.js to output.js buble input.js > output.js # Compile input.js to output.js, write sourcemap to output.js.map buble input.js -o output.js -m # Compile input.js to output.js with inline sourcemap buble input.js -o output.js -m inline # Only use transforms necessary for output.js to run in FF43 and Node 5 buble input.js -o output.js -t firefox:43,node:5 # As above, but use arrow function and destructuring transforms buble input.js -o output.js -t firefox:43,node:5 -y arrow,destructuring # Compile all the files in src/ to dest/ buble src -o dest Notes: * When piping to stdout, only inline sourcemaps are permitted ·
🌐
OneCompiler
onecompiler.com › nodejs
NodeJS Online Compiler
OneCompiler's NodeJS online editor helps you to write, compile, debug and run NodeJS code online
🌐
GitHub
github.com › nodejs › node › blob › main › BUILDING.md
node/BUILDING.md at main · nodejs/node
Xcode 16 is required to compile. ↩ · Binaries produced on these systems require libstdc++12, available from the AIX toolbox. ↩ · Binaries produced on these systems are compatible with glibc >= 2.28 and libstdc++ >= 6.0.25 (GLIBCXX_3.4.25). These are available on distributions natively supporting GCC 8.1 or higher, such as Debian 10, RHEL 8 and Ubuntu ...
Author   nodejs
Find elsewhere
🌐
Node.js
nodejs.org › en › download › package-manager
Node.js — Download Node.js®
# download and install Node.js (you may need to restart the terminal) nvm install 22 # verifies the right Node.js version is in the environment node -v # should print "v22.12.0" # verifies the right npm version is in the environment npm -v # should print "10.9.0"
🌐
Tutorialspoint
tutorialspoint.com › compilers › online-nodejs-compiler.htm
Online Node.js Compiler
Online Node Compiler - The best online Node compiler and editor which allows you to write Node Code, Compile and Execute it online from your browser itself. You can create Node Project using Node version Node v6.11.2. You can also Edit, Save, ...
🌐
Stack Overflow
stackoverflow.com › questions › 63710674 › online-compiler-usng-node-js-and-express
Online compiler usng Node.js and Express - Stack Overflow
Well I never used Heroku but tutorial video shows that it tooks the code directly and runs it for you. this is very easy to use service but also limited at the same time. you probably don't have access to your server to install other packages (to compile c++). I feel that you can do this as you said with child_process but you need to first create an environment that makes it possible. as you said "it is not supposed to, because why would Heroku have a gcc/g++ compiler?" you need a server that runs your code and has gcc/g++ compiler installed. ... Easiest way I can think of, is Dockerizinng you
🌐
DigitalOcean
digitalocean.com › community › tutorials › how-to-install-node-js-on-ubuntu-22-04
How to Install Node.js on Ubuntu (Step-by-Step Guide) | DigitalOcean
May 28, 2025 - In this guide, we will show you four different ways of getting Node.js installed on an Ubuntu server: using apt to install the nodejs package from Ubuntu’s d…
🌐
Node.js
nodejs.org › en › download › package-manager › all
Node.js — Installing Node.js via package manager
Node.js binary distributions are available from NodeSource. Packages compatible with Debian and Ubuntu based Linux distributions are available via Node.js snaps.
🌐
npm
npmjs.com › package › node-compiler
node-compiler - npm
Single page application compiler that supports a number of popular integrations.. Latest version: 0.5.0, last published: 11 years ago. Start using node-compiler in your project by running `npm i node-compiler`. There are no other projects in ...
      » npm install node-compiler
    
Published   Jan 06, 2015
Version   0.5.0
Author   Lewis Barnes
🌐
GitHub
github.com › vercel › pkg
GitHub - vercel/pkg: Package your Node.js project into an executable
This command line interface enables you to package your Node.js project into an executable that can be run even on devices without Node.js installed. Make a commercial version of your application without sources · Make a demo/evaluation/trial version of your app without sources · Instantly make executables for other platforms (cross-compilation)
Starred by 24.4K users
Forked by 1.1K users
Languages   JavaScript 78.0% | TypeScript 21.0% | CSS 0.6% | HTML 0.4% | Pug 0.0% | CoffeeScript 0.0%
🌐
TutorialsPoint
tutorialspoint.com › home › online programming compilers & editors › online node.js terminal
Run Node.js Code Online - Interactive Terminal
July 24, 2025 - Try our Online Node.js Terminal (Version Node v6.11.2) Write and Edit, Run, and Share your Nodejsterm Code online directly from your browser. This Online Compiler provides you the comfort to edit and compile your Nodejsterm code using latest version Node v6.11.2
🌐
npm
npmjs.com › package › compilex
compilex - npm
compilex is a node.js library which is used to build online code editor/compiler websites and webservices.. Latest version: 0.7.4, last published: 8 years ago. Start using compilex in your project by running `npm i compilex`. There are no other ...
      » npm install compilex
    
Published   Mar 18, 2017
Version   0.7.4
Author   Vishnu Bharathi
🌐
Codedamn
codedamn.com › online-compiler › node
Online Node Compiler And Playground (IDE) - codedamn
Don't worry we've got your back! Using the online Node.js compiler you can quickly code, collaborate, compile, run & share NodeJS code for free. The Node.js online compiler by codedamn is robust and feature-rich, running the latest LTS version NodeJS v14. Getting started is easy and fast since the editor shows sample boilerplate code.
🌐
Linuxize
linuxize.com › post › how-to-install-node-js-on-ubuntu-22-04
How to Install Node.js and npm on Ubuntu 22.04 | Linuxize
December 24, 2023 - As of now, the version of Node.js available in Ubuntu 22.04 repositories is v12.22.9 which is no longer supported and will not receive security updates since 30 Apr 2022. The installation process is quite simple. Run the following commands to update the package index and install Node.js and npm: ... The command above will install a number of packages, including the tools necessary to compile ...