When NPM install, make: G + +: command not found will be prompted

When NPM install is installed, an error may appear that prompts make:g++ Command not found, as follows:
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/yanyiwu/nodejieba/releases/download/2.4.1/nodejieba-v2.4.1-node-v72-linux-x64.tar.gz
node – pre – gyp WARN the pre – built binaries not found for [email protected] and [email protected] (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory /home/smart/jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build' CXX(target) Release/obj.target/nodejieba/lib/index.o make: g++: Command not found make: * * * [Release/obj. Target/nodejieba/lib/index o] make the Error 127: brigade directory /home/smart/Jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build '
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:310:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Linux 3.10.0-957.21.3. El7.x86_64 The command "/ usr/local/nodejs/bin/node" "/ usr/local/nodejs/lib/node_modules/NPM/node_modules/node - gyp/bin/node - gyp. Js" "build" fallback "- - to - build" "- the module =/home/smart/Jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build/Release/nodejieba node" "- module_name = nodejieba" "- module_path =/home/smart/Jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build/Release" "- napi_version = 5" "- node_abi_napi = for a" "- napi_build_version = 0" "- node_napi_label = node - v72"
gyp ERR! cwd /home/smart/jenkins/workspace/microservice_vue_demo/node_modules/nodejieba
gyp ERR! Node-v v12.16.3 Node-gyp-v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/ usr/local/nodejs/bin/node/usr/local/nodejs/lib/node_modules/NPM/node_modules/node - gyp/bin/node - gyp. Js build - fallback - to - build --module=/home/smart/jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build/Release/nodejieba.node --module_name=nodejieba - module_path =/home/smart/Jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build/Release - napi_version = 5 - node_abi_napi = for a - napi_build_version = 0 - node_napi_label = node - v72 (1)
' node-pre-gyp ERR! stack at ChildProcess. (/home/smart/jenkins/workspace/microservice_vue_demo/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:310:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)

install g++, switch to root, and execute

root@linx:~# yum install gcc -c++

After waiting for the package installation to complete, execute g++ -v to see that g++ has been successfully installed

root@linx:~# g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) 

Re-run NPM Install.

Read More: