By this article you can figure out how Janus gateway install in ubuntu 18.04 correctly.

First of all we will update our ubuntu instance.

sudo apt-get update

Then you can install required dependencies using below code block.

sudo apt-get install git libmicrohttpd-dev libjansson-dev libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev libconfig-dev pkg-config gengetopt libtool automake gtk-doc-tools cmake

after installing above dependencies you will need download and compile manually some other dependencies.


     git clone
	 cd libnice
	 ./configure --prefix=/usr
	 make && sudo make install

You can follow above code block as one by one or, put them into file called,
as below,


git clone
cd libnice
./configure --prefix=/usr
make && sudo make install

and run,


You can use this way to all of following code blocks also.


   tar xfv v2.2.0.tar.gz
   cd libsrtp-2.2.0
   ./configure --prefix=/usr --enable-openssl
   make shared_library && sudo make install

You can use any of above mentioned ways to install this.


git clone
cd usrsctp
./configure --prefix=/usr && make && sudo make install


git clone
cd libwebsockets
git checkout v2.4-stable
mkdir build
cd build
make && sudo make install

There is some other optional dependencies to install if you use those in your application.

MQTT (Optional)

git clone
cd paho.mqtt.c
sudo prefix=/usr make install

NanoMSG (Optional)

sudo apt-get install libnanomsg-dev

RabbitMQ C AMQP (optional)

git clone
cd rabbitmq-c
git submodule init
git submodule update
mkdir build && cd build
make && sudo make install

After installing above all dependencies we can move to compile Janus.

First we can clone the source code and move to directory.

git clone
cd janus-gateway

Then generate configuration file.


Now, using following command you can initialize a default Janus instance with almost everything that you need to get started.

./configure --prefix=/opt/janus

After that you can follow below code blocks,

make install

Don't forget as well only the first time of building Janus, to copy the default configuration files on the installation path with the following command:

make configs

Finally, you can check that, is this working by below code.

/opt/janus/bin/janus --help