AgoraIO/Basic-Recording

build.sh error

Closed this issue · 3 comments

gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@10.23.1 | linux | x64
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@10.23.1 | linux | x64
gyp info find Python using Python version 3.6.9 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [ '/home/ubuntu/.nvm/versions/node/v10.23.1/lib/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args 'binding.gyp',
gyp info spawn args '-f',
gyp info spawn args 'make',
gyp info spawn args '-I',
gyp info spawn args '/var/www/niya-server/modules/recording/record/src/build/config.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/ubuntu/.nvm/versions/node/v10.23.1/lib/node_modules/node-gyp/addon.gypi',
gyp info spawn args '-I',
gyp info spawn args '/home/ubuntu/.cache/node-gyp/10.23.1/include/node/common.gypi',
gyp info spawn args '-Dlibrary=shared_library',
gyp info spawn args '-Dvisibility=default',
gyp info spawn args '-Dnode_root_dir=/home/ubuntu/.cache/node-gyp/10.23.1',
gyp info spawn args '-Dnode_gyp_dir=/home/ubuntu/.nvm/versions/node/v10.23.1/lib/node_modules/node-gyp',
gyp info spawn args '-Dnode_lib_file=/home/ubuntu/.cache/node-gyp/10.23.1/<(target_arch)/node.lib',
gyp info spawn args '-Dmodule_root_dir=/var/www/niya-server/modules/recording/record/src',
gyp info spawn args '-Dnode_engine=v8',
gyp info spawn args '--depth=.',
gyp info spawn args '--no-parallel',
gyp info spawn args '--generator-output',
gyp info spawn args 'build',
gyp info spawn args '-Goutput_dir=.' ]
gyp info ok
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@10.23.1 | linux | x64
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Debug', '-C', 'build' ]
make: Entering directory '/var/www/niya-server/modules/recording/record/src/build'
CXX(target) Debug/obj.target/agorasdk/agora_node_ext/AgoraSdk.o
make: g++: Command not found
agorasdk.target.mk:111: recipe for target 'Debug/obj.target/agorasdk/agora_node_ext/AgoraSdk.o' failed
make: *** [Debug/obj.target/agorasdk/agora_node_ext/AgoraSdk.o] Error 127
make: Leaving directory '/var/www/niya-server/modules/recording/record/src/build'
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/ubuntu/.nvm/versions/node/v10.23.1/lib/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Linux 5.4.0-1029-aws
gyp ERR! command "/home/ubuntu/.nvm/versions/node/v10.23.1/bin/node" "/home/ubuntu/.nvm/versions/node/v10.23.1/bin/node-gyp" "build"
gyp ERR! cwd /var/www/niya-server/modules/recording/record/src
gyp ERR! node -v v10.23.1
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok
cp: cannot stat 'build/Debug/agorasdk.node': No such file or directory

i am getting this error. when running build.sh, these are build_debug.sh logs, can you please help me with this ?

Node : 10.23.1
Linux: 18

Fixed by running :
sudo apt install g++
sudo apt install build-essential