mkh
(Mohsen Khahani)
1
Trying to install on Ubuntu 18.04, got the following error:
2302 verbose stack Error: mediasoup@3.2.5 postinstall: `make -C worker`
2302 verbose stack Exit status 2
2302 verbose stack at EventEmitter.<anonymous> (/root/.nvm/versions/node/v8.16.1/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:301:16)
2302 verbose stack at emitTwo (events.js:126:13)
2302 verbose stack at EventEmitter.emit (events.js:214:7)
2302 verbose stack at ChildProcess.<anonymous> (/root/.nvm/versions/node/v8.16.1/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
2302 verbose stack at emitTwo (events.js:126:13)
2302 verbose stack at ChildProcess.emit (events.js:214:7)
2302 verbose stack at maybeClose (internal/child_process.js:915:16)
2302 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
2303 verbose pkgid mediasoup@3.2.5
2304 verbose cwd /var/conference/server
2305 verbose Linux 4.15.0-1045-aws
2306 verbose argv "/root/.nvm/versions/node/v8.16.1/bin/node" "/root/.nvm/versions/node/v8.16.1/bin/npm" "install" "mediasoup@3" "--save"
2307 verbose node v8.16.1
2308 verbose npm v6.4.1
2309 error code ELIFECYCLE
2310 error errno 2
2311 error mediasoup@3.2.5 postinstall: `make -C worker`
2311 error Exit status 2
2312 error Failed at the mediasoup@3.2.5 postinstall script.
2312 error This is probably not a problem with npm. There is likely additional logging output above.
2313 verbose exit [ 2, true ]
ibc
(Iñaki Baz Castillo)
2
No idea with those logs. Enter the mediasoup/worker
folder and run make
and let’s see.
mkh
(Mohsen Khahani)
3
...
CXX(target) /var/conference/server/node_modules/mediasoup/worker/out/Release/obj.target/mediasoup-worker/src/RTC/Router.o
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
mediasoup-worker.target.mk:223: recipe for target '/var/conference/server/node_modules/mediasoup/worker/out/Release/obj.target/mediasoup-worker/src/RTC/Router.o' failed
make[1]: *** [/var/conference/server/node_modules/mediasoup/worker/out/Release/obj.target/mediasoup-worker/src/RTC/Router.o] Error 4
make[1]: Leaving directory '/var/conference/server/node_modules/mediasoup/worker/out'
Makefile:22: recipe for target 'default' failed
make: *** [default] Error 2
ibc
(Iñaki Baz Castillo)
4
Honestly no idea. Ensure you are using all installation requirements:
ibc
(Iñaki Baz Castillo)
5
BTW it seems to be related to lack of RAM or SWAP memory:
linux - make -j 8 g++: internal compiler error: Killed (program cc1plus) - Stack Overflow, but that’s just a fast search in Google I’ve done right now.
1 Like
mkh
(Mohsen Khahani)
6
Yeah makes sense, it has just 512 MB of RAM 
mkh
(Mohsen Khahani)
8
The free plan of AWS Lightsail has only 512 MB of RAM which is very low.
I could get around the issue using this trick:
sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile
After compiling, you may wish to
sudo swapoff /swapfile
sudo rm /swapfile
2 Likes