Compiling kurento-media-server from sources on Ubuntu 14.04 and 16.04

1,777 views
Skip to first unread message

Sergei Vasilyev

unread,
Apr 15, 2017, 3:15:05 PM4/15/17
to kurento
Hi, Kurento users and the team,

seems some of us were trying to compile the kms server from C sources, and it turned out not to be an easy task. I just waned to share some step-by-steps here.

You can use the described strategy on both Ubuntu 14.04 and 16.04. By the time of writing the Kurento repo on GitHub contains sources version 6.6.1.

Heads up, you need a clean installation of ubuntu. I was testing the desktop versions 14.04.5 LTS (http://releases.ubuntu.com/trusty) and 16.04.2 LTS (http://releases.ubuntu.com/xenial), but the server distros should work too, please confirm. With non-clean installs, many packages (like those of kms 6.6.2-dev) were getting in the way making (or c-making ;)) cmake unhappy.

Copy-paste-run the instructions below by one line if you prefer watching the output in your terminal, answering "y" when asked.

1. Point to the deb repos to be looked for packages.
U 14.04
echo "deb http://ubuntu.kurento.org trusty-dev kms6" | sudo tee /etc/apt/sources.list.d/kurento-dev.list

U 16.04

echo "deb http://ubuntu.kurento.org xenial-dev kms6" | sudo tee /etc/apt/sources.list.d/kurento-dev.list

2. Download kms packages.
wget -O - http://ubuntu.kurento.org/kurento.gpg.key | sudo apt-key add -
sudo apt
-get update
sudo apt
-get install kurento-media-server-6.0

3. Install git, then clone kms sources.
sudo apt-get install git
git clone https
://github.com/Kurento/kurento-media-server.git

4. Now the trick, we need to find out, which packages are needed. If you install wrong packages, the build won't succeed. To figure out correct packages, we need to open the /home/dev/kurento-media-server/debian/control file and take a note of the "Build-Depends" section. Run apt-get install for all the listed packages.
sudo apt-get install cmake
sudo apt
-get install debhelper
sudo apt
-get install binutils
sudo apt
-get install kms-core-6.0-dev
sudo apt
-get install kms-elements-6.0-dev
sudo apt
-get install kms-filters-6.0-devsudo apt-get install libboost-dev libboost-system-dev libboost-filesystem-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libboost-log-dev libevent-dev libssl-dev

5. On Ubuntu 16.04, you need to install some extra packages:
U 16.04
sudo apt-get install libboost-all-dev
sudo apt
-get install libssl-dev
sudo apt
-get install pkg-config
sudo apt
-get install libevent-dev

6. Now you are ready to cross fingers and go cmake:
cd ~/kurento-media-server
cmake
.
make
-j4
sudo make install

7. If you are going to work on kms filters or elements, you need to clone their sources. I needed kms elements, so I provide instructions on building them, but for filters or whatever else kms packages you can use the same approach.
8. Get dependencies from the "Build-Depends" section of /home/dev/kms-elements/debian/control
sudo apt-get install pkg-config
sudo apt
-get install kms-core-6.0-dev
sudo apt
-get install libboost-filesystem-dev
sudo apt
-get install libboost-test-dev
sudo apt
-get install libsoup2.4-dev
sudo apt
-get install libnice-dev
sudo apt
-get install gstreamer1.5-nice
sudo apt
-get install uuid-dev
sudo apt
-get install valgrind
sudo apt
-get install openwebrtc-gst-plugins-dev
sudo apt
-get install ffmpeg
sudo apt
-get install libav-tools
sudo apt
-get install libssl-dev

9. Now cmake/make/install/develop.
cd ~/kms-elements
cmake
.
make
-j4
sudo make install

The instruction above are not optimized in a sense that some of the packages will be tried to install twice, but extra warnings "already installed" is nothing compared to the joy of successful build in the end. Maybe some of you will come up with a source build installation script. I tested on bare metal, never tried VMs /AWS instances.

Please come back with any issues you come across. If the instructions work for you, the team might want to include them in the docs, no attribution needed.

Cheers,
Sergei

Micael Gallego

unread,
Apr 16, 2017, 5:42:40 AM4/16/17
to kur...@googlegroups.com
Hi Sergei, 

Thank you for the information.

We are working in a detailed documentation on how to compile Kurento Media Server. This is a work in progress document, but currently it is very complete:


Feel free to add comments if you want.

Best regards

Micael Gallego
Kurento / OpenVidu Project Lead

--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+unsubscribe@googlegroups.com.
To post to this group, send email to kur...@googlegroups.com.
Visit this group at https://groups.google.com/group/kurento.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/4ada24db-6371-40c9-b490-0728de9c863e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sergei Vasilyev

unread,
Apr 17, 2017, 4:57:08 AM4/17/17
to kurento
Thanks, Micael, for the link. Very helpful.

Sergei

virendra bhati

unread,
Jun 27, 2017, 1:33:19 PM6/27/17
to kurento
Dear Team,

I am getting below error when i try to run

Error message from server: Could not find media server at addressws://localhost:8888/kurento. Exiting with error SyntaxError: Module 'elements'is not installed in the Kurento Media Server

Virendra Bhati

unread,
Jun 28, 2017, 2:55:01 AM6/28/17
to kurento
Dear Team,

I start again installation on fresh Ubuntu 14.04 and as per installation process. Below commands of kms not working

sudo apt-get install kurento-media-server-6.0

sudo apt-get install kms-core-6.0-dev
sudo apt-get install kms-elements-6.0-dev
sudo apt-get install kms-filters-6.0-devsudo

If repo missed on server or anything related to kurento repo?

co luu

unread,
Oct 19, 2017, 4:08:47 AM10/19/17
to kurento
The link on this doc doesn't work!
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.

phom...@gmail.com

unread,
Oct 19, 2017, 4:12:26 AM10/19/17
to kur...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages