2

I am following janus documentation to build a video mcu system. I installed all the dependencies of it according to the read me file. http://janus.conf.meetecho.com/docs/

after that when I run the script using sh install.sh I am getting following error

In file included from test.c:1:0:
../websock/src/websock.h:55:26: fatal error: event2/event.h: No such file or directory
 #include <event2/event.h>
                          ^
compilation terminated.
make[1]: *** [test.o] Error 1
make[1]: Leaving directory `/home/gayan/MyDetails/MyApplications/virtualClassRoomTest/janus-gateway/wstest'
make: *** [wstest] Error 2

The installer couldn't find the libwebsock lib, which is needed for WebSockets
You can install version 1.0.4 (required!) with the following steps:
    wget http://paydensutherland.com/libwebsock-1.0.4.tar.gz
    tar xfv libwebsock-1.0.4.tar.gz
    cd libwebsock-1.0.4
    ./configure --prefix=/usr && make && sudo make install

    [Note: you may need to pass --libdir=/usr/lib64 to the configure script if you're installing on a x86_64 distribution]

If you're not interested in WebSockets support, you can disable them passing nowebsockets to the install script:
    ./install.sh nowebsockets

I also install the libwebsock according to the above steps, but still the error is showing. event2 directory is not in the janus-gateway codes. here is the github link for all the source code. https://github.com/meetecho/janus-gateway.git
Any kind of help would be appreciated.

mpromonet
  • 11,326
  • 43
  • 62
  • 91
Gayan Charith
  • 7,301
  • 2
  • 20
  • 32
  • I am guessing libwebsocket is not in your path...Also, did you clean and make again? – Benjamin Trent Jul 21 '14 at 14:21
  • 1
    Thanks for the comment Benjamin. libwebsocket is inside the janus-gateway folder as the document instructs. I also did _make clean_ and _make_ again. But the result is same. as I mentioned earlier, event2 folder and event.h file is also not in the source codes. – Gayan Charith Jul 21 '14 at 17:03
  • 3
    And you don't have a 64 bit OS? I have done exactly what you have done and it worked fine on Debian Jessie x86. Also, LibWebsocket is NOT to be in the janus-gateway folder...It is to be INSTALLED and located in your PATH. Most likely the lib file in `/usr/lib/` and the include files in `/usr/include/`. – Benjamin Trent Jul 25 '14 at 21:36
  • @BenjaminTrent Can you take a look at [this](https://stackoverflow.com/questions/46262133/janus-gateway-configure-shows-websockets-not-enabled) Would appreciate any help. – Sunny Sep 17 '17 at 09:04

2 Answers2

2

The full installation steps to have websockets working(Ubuntu 14) are:

mkdir -p ~/build

sudo apt-get install libmicrohttpd-dev libjansson-dev libnice-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libini-config-dev libcollection-dev libwebsockets-dev pkg-config gengetopt automake libtool doxygen graphviz git cmake

sudo apt-get install libavformat-dev

echo "Start installing libwebsockets"
cd ~/build
git clone git://git.libwebsockets.org/libwebsockets
cd libwebsockets
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr  -DLWS_SERVER_OPTION_DO_SSL_GLOBAL_INIT=ON ..
make && sudo make install

echo "Start installing Janus"
cd ~/build
git clone git://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --disable-data-channels --disable-rabbitmq --disable-docs --prefix=/opt/janus LDFLAGS="-L/usr/local/lib -Wl,-rpath=/usr/local/lib" CFLAGS="-I/usr/local/include"

make && sudo make install
sudo make configs

Make sure to copy certificates if using wss, chrome is really picky about that stuff. If using self signed certificates you have to trust them in chrome(very intuitive procedure:)))

sudo cp mycert.pem /opt/janus/share/janus/certs/
sudo cp mycert.key /opt/janus/share/janus/certs/
1

I had this problem and solve it after

sudo apt-get install libevent-dev

My system is ubuntu 14.04 64 bit

Altanai
  • 1,323
  • 1
  • 19
  • 33