Linux install instructions

For help and support with Linux-specific issues
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
User avatar
Sami32
Posts: 819
Joined: Mon Apr 11, 2016 5:09 am

Linux install instructions

Post by Sami32 » Fri Jul 29, 2016 1:00 am

This is an attempt to consolidate the necessary installation informations for Linux users.
Thanks to @Nadahar and @Fenzor for sharing their knowledge. 8-)
Your participation is welcome and strongly encouraged to improve this documentation. ;)
--------------------------------------------------------------------------------------------

To install UMS from the tarball on Linux, open a terminal and enter the
following commands (replace <version> with the version you're installing):
Note: These instructions have been tested on Ubuntu 12.04, but something similar
should work on most Unix distributions)

1) Install the dependencies (this only needs to be done once):

# UMS requires a Java Virtual Machine to run. Which version depends on which binary package was
# downloaded. UMS for Java 7 would need version 7 or newer, UMS for Java 8 would need version 8 or
# newer. The most common JVM's to use on Linux is openjdk. Which, if any, of the packages that's
# available depends on your distro, it's version and what sources are enabled.

# Install JVM on Debian/Ubuntu and derivates: Debian 8 need to use backports to install openjdk-8 at the
# time of writing. It's not possible to cover all the sources needed for the different versions in this
# document. If the package isn't found, make sure to run ```apt-get update``` to make sure the sources
# are refreshed.
# To install openjdk-7 run:
sudo apt-get install openjdk-7-jre
# To install openjdk-8 run:
sudo apt-get install openjdk-8-jre

# Install JVM on Fedora, OpenSUSE, Mandriva, Red Hat/Centos and derivates: The epel repo might be
# needed on some platforms.
# To install openjdk-7 run:
sudo yum install java-1.7.0-openjdk
# To install openjdk-8 run:
sudo yum install java-1.8.0-openjdk
# Install JVM on Arch:
# To install openjdk-7 run:
sudo pacman -S jre7-openjdk
# To install openjdk-8 run:
sudo pacman -S jre8-openjdk

# UMS use MediaInfo to get information about media files. It can be run without it, but media handling will
# suffer as UMS won't have a detailed information available.
# Install MediaInfo on Debian/Ubuntu and derivates:
sudo apt-get install mediainfo
# Install MediaInfo on Fedora, OpenSUSE, Mandriva, Red Hat/Centos and derivates:
sudo yum install mediainfo
# Install MediaInfo on Arch (community repository must be enabled):
sudo pacman -S mediainfo

# You can optionally install dcraw (to decode raw images from digital cameras) and VLC (to use VLC as a
# transcoding engine). Just omit one if you don't want that.
# Install dcraw and VLC on Debian/Ubuntu and derivates:
sudo apt-get install dcraw vlc
# Install dcraw and VLC on Fedora, OpenSUSE, Mandriva, Red Hat/Centos and derivates:
sudo yum install dcraw vlc
# Install dcraw and VLC on Arch (extra repository must be enabled):
sudo pacman -S dcraw vlc

# UMS uses tsMuxeR as a transcoding engine. tsMuxeR is 32 bit only, so installation of some 32 bit libraries
# are necessary on 64 bit platforms if you want to use tsMuxeR as a transcoding engine.
# Install tsMuxeR dependencies on 64 bit Debian/Ubuntu and derivates:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0:i386 libstdc++6:i386
# Install tsMuxeR dependencies on 64 bit Fedora, OpenSUSE, Mandriva, Red Hat/Centos and derivates:
sudo yum install zlib.i686 ncurses-libs.i686 bzip2-libs.i686 libstdc++.i686
# Install tsMuxeR dependencies on 64 bit Arch (multilib repo must be enabled):
sudo pacman -S lib32-zlib lib32-ncurses lib32-bzip2 lib32-libstdc++5

# Other distros and/or package managers not covered here will need to have the same/corresponding
# packages installed. If a package isn't available, the binary must be downloaded and installed or built from
# source.

2) Download the tarball e.g.:

# if wget isn't installed, run: sudo apt-get install wget
wget http://sourceforge.net/projects/unimedi ... z/download

3) Extract the tarball into a ums-<version> directory:

tar xzvf ums-<version>.tgz

4) Run (note: UMS should NOT be run as root):

cd ums-<version>
./UMS.sh

UMS accesses some files in the ums-<version> directory (the working directory).
Other files will be looked for in ~/.config/UMS

N.B. These informations are taken from intall.txt in Github and are displayed here hoping that a better visibility will help Linux users.
Last edited by Sami32 on Sun Jul 31, 2016 9:55 pm, edited 4 times in total.

Fenzor
Posts: 20
Joined: Fri Apr 12, 2013 5:03 am
Location: Trondheim, Norway

Re: Linux install documentation

Post by Fenzor » Sat Jul 30, 2016 7:14 am

To test if you're having the issue with tsMuxeR, do this: (This will work on most, if not all distros)
1. Go into the directory "linux" in your UMS-directory. (Where you run "ums.sh" from...)
2. Run: "./tsMuxeR"
3. Then run: "echo $?"
4. If you get "127" you have to fix this. (See original post above for Ubuntu, and below in this post for Arch Linux)

Fix: (Arch Linux only)
1. Open "/etc/pacman.conf" with your favourite text editor. :) (Remember to open as root or with sudo)
2. Uncomment these lines: (remove the leading #-character)
[multilib]
Include = /etc/pacman.d/mirrorlist
3. Save the document
4. Run "sudo pacman -Syu"
5. Run "sudo pacman -S lib32-ncurses lib32-freetype2"
Last edited by Fenzor on Sun Jul 31, 2016 3:53 am, edited 1 time in total.

Nadahar
Posts: 1240
Joined: Tue Jun 09, 2015 5:57 pm

Re: Linux install documentation

Post by Nadahar » Sun Jul 31, 2016 12:44 am

Fenzor wrote: To test if you're having the issue with tsMuxeR, do this:
1. Go into the directory "linux" in your UMS-directory. (Where you run "ums.sh" from...)
2. Run: "./tsMuxeR"
3. Then run: "echo $?"
4. If you get "127" you have to fix this. (See below)
The above part seems general (not Arch specific). It should work for any Linux distro, right? Is the test really needed, isn't the case as easy as "64 bit Linux = problem"?

Fenzor
Posts: 20
Joined: Fri Apr 12, 2013 5:03 am
Location: Trondheim, Norway

Re: Linux install documentation

Post by Fenzor » Sun Jul 31, 2016 3:50 am

Nadahar wrote:
Fenzor wrote: To test if you're having the issue with tsMuxeR, do this:
1. Go into the directory "linux" in your UMS-directory. (Where you run "ums.sh" from...)
2. Run: "./tsMuxeR"
3. Then run: "echo $?"
4. If you get "127" you have to fix this. (See below)
The above part seems general (not Arch specific). It should work for any Linux distro, right? Is the test really needed, isn't the case as easy as "64 bit Linux = problem"?
Yeah, you're of course correct in that the test will work on other distro's too. :) (I will correct the original post)

I wrote the test-part only for those who don't know (for some reason) if they have these 32-bit libraries on their system or not.
But yeah, a simple rule of thumb is that if you're on 64-bit Linux you'll have to install these libraries. :D

Nadahar
Posts: 1240
Joined: Tue Jun 09, 2015 5:57 pm

Re: Linux install documentation

Post by Nadahar » Sun Jul 31, 2016 4:31 am

The test is great, I'm only asking because I wasn't sure. I'm a bit unsure if it should be included in the documentation or not though, because it might confuse some (they have to find the right folder from which to launch tsMuxeR). It won't hurt trying to install the 32 bit libs even if they are already installed, on the other hand it's not necessary. It's complexity of documentation vs what's technically correct.

It's great that you've actually verified and tested what's needed for Arch. I have tried to "construct" commands for Arch without having access to it as you can see https://github.com/UniversalMediaServer ... r/pull/964. I had no idea how to enable the repo's, so I only mentioned that multilib must be enabled (the same goes for extra and community for other packages).

What I do find interesting is that you've ended up with completely different packages than I have based on those needed on Debian/Ubuntu. Why is that? My "suggestion" was:

Code: Select all

pacman -S lib32-zlib lib32-ncurses lib32-bzip2 lib32-libstdc++5
Your is:

Code: Select all

pacman -S lib32-ncurses lib32-freetype2
ncurses is in common so that one's ok. Further I can see that dependencies for lib32-freetype2 are:

Code: Select all

    freetype2
    lib32-bzip2
    lib32-harfbuzz
    lib32-libpng
    lib32-zlib
    gcc-multilib (make)
That covers everything except lib32-libstdc++5 which was questionable in itself since it was version 6, not 5, that was needed at Debian/Ubunto, but I couldn't find it for Arch.

The questions therefore are: Are lib32-freetype2 really needed, or is it just a convenient way to install the other dependencies? What about lib32-libstdc++? Isn't it needed for Arch only, or might that be the same for Debian/Ubuntu as well? What about Fedora etc.? Is libstdc++ in fact "the same" as gcc-multilib? Or do they have some common dependency that's what's really needed? I really know too little about these libs and what they do to know...

Fenzor
Posts: 20
Joined: Fri Apr 12, 2013 5:03 am
Location: Trondheim, Norway

Re: Linux install documentation

Post by Fenzor » Sun Jul 31, 2016 5:04 am

Yeah, I am actually not really sure what dependencies tsMuxeR has. I don't even know if it's open-source or not...
But these were the ones I had to install.
Firstly I installed "lib32-ncurses" only and tried to launch.
But then I got the error: "./tsMuxeR: error while loading shared libraries: libfreetype.so.6: cannot open shared object file: No such file or directory"

So I tried to install "lib32-freetype2", and it also included some dependencies of it's own. So I installed all of them. :p
And now tsMuxeR seemingly runs well. :D

But now after you posted (@Nadahar) I've tested to remove ONLY the package "lib32-freetype2", and now tsMuxeR complains again for missing libfreetype.so.6.
So in some way it seems to be dependent on libfreetype2, but maybe not directly...


Nadahar
Posts: 1240
Joined: Tue Jun 09, 2015 5:57 pm

Re: Linux install instructions

Post by Nadahar » Thu Aug 18, 2016 3:37 am

This is a mess, I just tested "our" description for tsMuxeR dependencies on Ubuntu 12.04 LTS and it does NOT work. 12.04 doesn't have full multiarch support from what I understand, so the "--add-architecture" fail. The remaining pacages will install, but tsMuxeR complains about missing libfreetype.so.6 when run. I haven't found a 32 bit version of that lib, but my Linux knowledge is way too limited to figure out what the problem really is. My guess is that it might work on a newer version of Ubuntu with full multiarch support, but then I'll have to download and install that first :(

Linux is a mess, my guess is that this must be verified for each distro and version to be accurate. It does indicate that libfreetype is needed not only on Arch though, and I'm guessing that adding the i386 architecture is supposed to provide that.

User avatar
atamariya
Moderator
Posts: 98
Joined: Sun Aug 11, 2013 1:15 am

Re: Linux install instructions

Post by atamariya » Mon Aug 22, 2016 4:43 pm

If I understand correctly, tsMuxer is only used for subtitles. Since ffmpeg can do that as well, do you really need to continue supporting tsMuxer?

Nadahar
Posts: 1240
Joined: Tue Jun 09, 2015 5:57 pm

Re: Linux install instructions

Post by Nadahar » Mon Aug 22, 2016 6:27 pm

If I understand correctly tsMuxeR doesn't actually transcode, it just remuxes the existing streams into a new format. That means it's much faster and lighter than e.g. ffmpeg when that's sufficient, and the conversion is lossless as opposed to actual reencoding which is not. I'd say it's a genious way to "transcode" as long as it's sufficient.

Post Reply