joshuaboniface / Emby

A (hard) fork of the Emby media browser project - OBSOLETE - see jellyfin/jellyfin
GNU General Public License v2.0
40 stars 4 forks source link

Can't install on Ubuntu 16.04 #8

Open Sockolet opened 6 years ago

Sockolet commented 6 years ago

I've successfully built the Debian package using the command that you provide in the readme.

But the result is a little bit weird. It gives a ~10MB file when a usual one is ~50MB. When I try to install it, it says something relating dependencies: libc6.0, libc6.1 and libc0.1. Is weird because I've got official emby 3.5.0 (and past versions) installed without any dependency warning. And it's more weird since I was using Carlos Hernandez's ppa in Ubuntu without issues which is the one that you refers on your readme.

Is there anyway to build the package for Ubuntu?

joshuaboniface commented 6 years ago

That size is right - my copy is 11M when build:

-rw-r--r--  1 joshua operator  11M Aug  9 01:16 emby-server_3.4.1.18-unlocked_all.deb

How are you installing the package? I assume dpkg -i? If so, can you try running apt -f install first, to see if that grabs the dependencies? If not, please post the full dpkg/apt output and I can provide some guidance!

Sockolet commented 6 years ago

If I run sudo apt -f install it does nothing. I can run it after the attempt of installation.

This is the output:

[meiden@ubuntu]:(61.2Mb)~$ sudo dpkg -i emby-server_3.4.1.18-unlocked_all.deb 
Selecting previously unselected package emby-server.
(Reading database ... 228200 files and directories currently installed.)
Preparing to unpack emby-server_3.4.1.18-unlocked_all.deb ...
Unpacking emby-server (3.4.1.18-unlocked) ...
dpkg: warning: unable to delete old directory '/etc/firewalld/services': Directory not empty
dpkg: warning: unable to delete old directory '/etc/firewalld': Directory not empty
dpkg: dependency problems prevent configuration of emby-server:
 emby-server depends on libc6 (>= 2.27) | libc6.1 (>= 2.27) | libc0.1 (>= 2.27); however:
  Version of libc6:amd64 on system is 2.23-0ubuntu10.
  Package libc6.1 is not installed.
  Package libc0.1 is not installed.

dpkg: error processing package emby-server (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
Errors were encountered while processing:
 emby-server
[meiden@ubuntu]:(61.2Mb)~$ sudo apt -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  emby-server
0 upgraded, 0 newly installed, 1 to remove and 7 not upgraded.
1 not fully installed or removed.
After this operation, 36.6 MB disk space will be freed.
Do you want to continue? [Y/n] 
Sockolet commented 6 years ago

Here's official 3.5.0 package output (disregard 'service masked' warning):

[meiden@ubuntu]:(61.3Mb)~$ sudo dpkg -i emby-server-deb_3.5.3.0_amd64.deb 
Selecting previously unselected package emby-server.
(Reading database ... 228198 files and directories currently installed.)
Preparing to unpack emby-server-deb_3.5.3.0_amd64.deb ...
Unpacking emby-server (3.5.3.0) ...
Setting up emby-server (3.5.3.0) ...
usermod: no changes
Synchronizing state of emby-server.service with SysV init with /lib/systemd/systemd-sysv-install...
Executing /lib/systemd/systemd-sysv-install enable emby-server
insserv: warning: current start runlevel(s) (empty) of script `emby-server' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `emby-server' overrides LSB defaults (0 1 6).
Failed to execute operation: Unit file is masked
Failed to start emby-server.service: Unit emby-server.service is masked.
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for ureadahead (0.100.0-19) ...
[meiden@ubuntu]:(61.3Mb)~$ 

PS: Ubuntu version is Ubuntu Server 16.04 fully updated.

joshuaboniface commented 6 years ago

Aah OK, so it's looking for one of 3 different names for the libc package, and finding none of them, specifically since the version in Ubuntu 16.04 is "too old". The specific relevant line is:

emby-server depends on libc6 (>= 2.27) | libc6.1 (>= 2.27) | libc0.1 (>= 2.27); however:
Version of libc6:amd64 on system is 2.23-0ubuntu10.

This gets set automatically during the package build automatically by this line in the debian/control file:

Depends: ${shlibs:Depends}, ${cli:Depends}, ${misc:Depends}, at, libsqlite3-0, mono-runtime (>= 5.14)

So it looks like something is wonky with the build environment. Unfortunately all my experience building Debian packages is on Debian itself, so I suspect there's just something weird in the way Ubuntu does it. Are you building it on an Ubuntu 16.04 machine as well?

JustAMan commented 6 years ago

My current approach yields a 23M-sized binary (that's 3.5.2 for netcore), on Debian 9. So 10 MB is definitely too small...

joshuaboniface commented 6 years ago

@JustAMan I found the 3.4.X builds to be quite a bit smaller - I think because it's not statically linking any dependencies. 3.5.X were a bit bigger when I was testing them out (closer to your 23M).

Sockolet commented 6 years ago

I'm building it on a different Ubuntu 18.04 machine. But I can try in the 16.04 itself for testing if it is necessary.

joshuaboniface commented 6 years ago

Yea that would do it. If you build the deb on 18.04 you're using the shared libraries of 18.04 as dependencies which aren't available on 16.04. You'd need to build the 16.04 package on a 16.04 machine.

Sockolet commented 6 years ago

Well, i was able to built successfully the deb package, and installed it without further issues. Now I'm facing another weird thing, because it looks like the service fails at startup:

[meiden@ubuntu]:(70.6Mb)~$ sudo systemctl status emby-server.service 
● emby-server.service - Emby Media Server
   Loaded: loaded (/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Tue 2018-10-23 21:45:18 CEST; 3min 5s ago
  Process: 29912 ExecStopPost=/usr/bin/emby-server clear (code=exited, status=0/SUCCESS)
 Main PID: 28633 (code=exited, status=1/FAILURE)

Oct 23 21:40:43 ubuntu systemd[1]: Started Emby Media Server.
Oct 23 21:45:02 ubuntu emby-server[28633]: find: ‘./proc/29803’: No such file or directory
Oct 23 21:45:02 ubuntu emby-server[28633]: find: ‘./proc/29804’: No such file or directory
Oct 23 21:45:07 ubuntu su[28633]: Successful su for meiden by root
Oct 23 21:45:07 ubuntu su[28633]: + ??? root:meiden
Oct 23 21:45:07 ubuntu su[28633]: pam_unix(su:session): session opened for user meiden by (uid=0)
Oct 23 21:45:07 ubuntu systemd[1]: emby-server.service: Main process exited, code=exited, status=1/FAILURE
Oct 23 21:45:18 ubuntu systemd[1]: emby-server.service: Unit entered failed state.
Oct 23 21:45:18 ubuntu systemd[1]: emby-server.service: Failed with result 'exit-code'.

Does anyone know where are the emby server logs stored?

JustAMan commented 6 years ago

By default they're under /var/lib/emby/logs You might not need those, though, it looks more like you have an issue with emby-server script.

Sockolet commented 6 years ago

Facing same problem after have purged any old configuration files:


[meiden@ubuntu]:(1.5Gb)~/utils$ sudo dpkg -i emby-server_3.4.1.18-unlocked_all.deb 
Selecting previously unselected package emby-server.
(Reading database ... 229289 files and directories currently installed.)
Preparing to unpack emby-server_3.4.1.18-unlocked_all.deb ...
Unpacking emby-server (3.4.1.18-unlocked) ...
Setting up emby-server (3.4.1.18-unlocked) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
[meiden@ubuntu]:(1.5Gb)~/utils$ sudo systemctl status emby-server.service
● emby-server.service - Emby Media Server
   Loaded: loaded (/lib/systemd/system/emby-server.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2018-10-28 09:22:58 CET; 1min 42s ago
 Main PID: 3928 (code=exited, status=1/FAILURE)

Oct 28 09:22:58 ubuntu su[3928]: + ??? root:emby
Oct 28 09:22:58 ubuntu su[3928]: pam_unix(su:session): session opened for user emby by (uid=0)
Oct 28 09:22:58 ubuntu emby-server[3928]:   at (wrapper managed-to-native) SQLitePCL.SQLite3Provider_sqlite3+NativeMethods.sqlite3_libversion_number()
Oct 28 09:22:58 ubuntu emby-server[3928]:   at SQLitePCL.SQLite3Provider_sqlite3.SQLitePCL.ISQLite3Provider.sqlite3_libversion_number () [0x00000] in 
Oct 28 09:22:58 ubuntu emby-server[3928]:   at SQLitePCL.raw.SetProvider (SQLitePCL.ISQLite3Provider imp) [0x00008] in <73e712ea9d1b47d7be4afb0c91ae92
Oct 28 09:22:58 ubuntu emby-server[3928]:   at MediaBrowser.Server.Mono.MainClass.SetSqliteProvider () [0x00005] in <e60d14e3ce374bc799b8d0c4307705b3>
Oct 28 09:22:58 ubuntu emby-server[3928]:   at MediaBrowser.Server.Mono.MainClass.Main (System.String[] args) [0x0000a] in <e60d14e3ce374bc799b8d0c430
Oct 28 09:22:58 ubuntu systemd[1]: emby-server.service: Main process exited, code=exited, status=1/FAILURE
Oct 28 09:22:58 ubuntu systemd[1]: emby-server.service: Unit entered failed state.
Oct 28 09:22:58 ubuntu systemd[1]: emby-server.service: Failed with result 'exit-code'.

I don't know if anyone can help me with this...

JustAMan commented 6 years ago

Do you have sqlite installed in your system? It seems that this managed wrapper fails to use the native version it should be wrapping.