unable to install ruby em-websocket: giving fatal error in Ubuntu 16.04

83 views Asked by At

websocket via gem install em-websocket. Got this error:

compiling binder.cpp
cc1plus: warning: command line option ‘-Wimplicit-int’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wdeclaration-after-statement’ is valid for C/ObjC but not for C++
cc1plus: warning: command line option ‘-Wimplicit-function-declaration’ is valid for C/ObjC but not for C++
In file included from binder.cpp:20:0:
project.h:25:20: fatal error: iostream: No such file or directory
compilation terminated.
Makefile:233: recipe for target 'binder.o' failed
make: *** [binder.o] Error 1
make failed, exit code 2
...

How to deal with this?

1

There are 1 answers

0
indrajit guha On

iostream was introduced in libstc++-6.Installing libstdc++6-4.4-dev by sudo apt-get install libstdc++6-4.4-dev. it will delete currently installed g++.Then run sudo apt-get install g++.This solved my problem.