2

Salam (means hello) :)

I'm trying to install node.js on my ubuntu 12.04 desktop. I've downloaded node package and followed readme file, ./configure and make commands worked fine, but make install command results in this:

nasser@nasser-pc:~/Downloads/node-v0.10.21$ sudo make install
[sudo] password for nasser: 
make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/home/nasser/Downloads/node-v0.10.21/out'
  g++ '-DENABLE_DEBUGGER_SUPPORT' '-DENABLE_EXTRA_CHECKS' '-DV8_TARGET_ARCH_IA32' -I../deps/v8/src  -Wall -Wextra -Wno-unused-parameter -pthread -m32 -fno-strict-aliasing -O2 -fno-strict-aliasing -fno-tree-vrp -fno-rtti -fno-exceptions -MMD -MF /home/nasser/Downloads/node-v0.10.21/out/Release/.deps//home/nasser/Downloads/node-v0.10.21/out/Release/obj.target/v8_base/deps/v8/src/accessors.o.d.raw  -c -o /home/nasser/Downloads/node-v0.10.21/out/Release/obj.target/v8_base/deps/v8/src/accessors.o ../deps/v8/src/accessors.cc
make[1]: g++: Command not found
make[1]: *** [/home/nasser/Downloads/node-v0.10.21/out/Release/obj.target/v8_base/deps/v8/src/accessors.o] Error 127
make[1]: Leaving directory `/home/nasser/Downloads/node-v0.10.21/out'
make: *** [node] Error 2
Nasser Torabzade
  • 6,490
  • 8
  • 27
  • 36
  • possible duplicate of [Help on installing Node.js on Ubuntu 10.04 from terminal?](http://stackoverflow.com/questions/7067176/help-on-installing-node-js-on-ubuntu-10-04-from-terminal) – hexacyanide Nov 03 '13 at 18:11
  • 2
    Install a C++ compiler. – SLaks Nov 03 '13 at 18:11

4 Answers4

7

Maybe try this?

sudo apt-get install g++

opcode
  • 419
  • 5
  • 11
0

To begin with, go through Compiling Easy How To

./configure
make
0

Check out this answer if you're still having trouble. It's very easy to do from a PPA that I maintain.

Community
  • 1
  • 1
Chris Lea
  • 1,001
  • 8
  • 4
0

Usually, it is caused by the old version, check the version gcc and gcc-c++, they should be newer than 4.8, I used the centos 6, so I can only have the 4.4 version, you can upload a compiled package https://nodejs.org/dist/v4.2.2/node-v4.2.2-linux-x64.tar.gz hope can solved your problem:)

xinyi.li
  • 1
  • 1