implement janus gateway for webrtc

泄露秘密 提交于 2019-12-22 12:38:32

问题


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.


回答1:


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/



回答2:


I had this problem and solve it after

sudo apt-get install libevent-dev

My system is ubuntu 14.04 64 bit



来源:https://stackoverflow.com/questions/24866712/implement-janus-gateway-for-webrtc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!