I'm trying to install node.js in my CentOS server,befor I run the "make"commend,everything seems perfect.When I run the make command and it produces the following:

make -C out BUILDTYPE=Release V=1
make[1]: Entering directory `/usr/local/src/node-v10.15.3/out'
  g++ -o /usr/local/src/node-v10.15.3/out/Release/obj.host/v8_libbase/deps/v8/src/base/bits.o ../deps/v8/src/base/bits.cc '-DV8_GYP_BUILD' '-DV8_TYPED_ARRAY_MAX_SIZE_IN_HEAP=0' '-DV8_TARGET_ARCH_X64' '-DV8_EMBEDDER_STRING="-node.51"' '-DENABLE_DISASSEMBLER' '-DV8_PROMISE_INTERNAL_FIELD_COUNT=1' '-DV8_INTL_SUPPORT' '-DV8_CONCURRENT_MARKING' '-DDISABLE_UNTRUSTED_CODE_MITIGATIONS' -I../deps/v8  -pthread -Wall -Wextra -Wno-unused-parameter -m64 -fno-strict-aliasing -m64 -fdata-sections -ffunction-sections -O3 -O3 -fno-omit-frame-pointer -fno-rtti -fno-exceptions -std=gnu++1y -MMD -MF /usr/local/src/node-v10.15.3/out/Release/.deps//usr/local/src/node-v10.15.3/out/Release/obj.host/v8_libbase/deps/v8/src/base/bits.o.d.raw   -c
make[1]: g++: Command not found
make[1]: *** [/usr/local/src/node-v10.15.3/out/Release/obj.host/v8_libbase/deps/v8/src/base/bits.o] Error 127
make[1]: Leaving directory `/usr/local/src/node-v10.15.3/out'
make: *** [node] Error 2

Oh, when i run the ./configurecommend it produces the following:

WARNING: failed to autodetect C++ compiler version (CXX=g++)
creating icu_config.gypi
* Using ICU in deps/icu-small
WARNING: Using floating patch "tools/icu/patches/62/source/i18n/decimfmt.cpp" from "tools/icu"

I try to solve it by Google,but I'm not find anything help me.


You need to install g++ by sudo yum install gcc-c++, in case any other build tool is needed, just sudo yum groupinstall "Development Tools" to install essential build tools

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.