本文介绍了为webrtc实施janus网关的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在遵循janus文档来构建视频MCU系统.我根据自述文件安装了它的所有依赖项. http://janus.conf.meetecho.com/docs/

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/

之后,当我使用sh install.sh运行脚本时,出现以下错误

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

我还根据上述步骤安装了libwebsock,但仍然显示错误. event2目录不在janus-gateway代码中.这是所有源代码的github链接. https://github.com/meetecho/janus-gateway.git
任何帮助将不胜感激.

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.

推荐答案

要使websockets正常工作的完整安装步骤(Ubuntu 14)如下:

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

如果使用wss,请确保复制证书,chrome对这些东西确实很挑剔.如果使用自签名证书,则必须使用chrome信任它们(非常直观的过程:)))

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/

这篇关于为webrtc实施janus网关的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-12 12:41