aero's picture

Hi, two month ago I’ve installed debian-10-turnkey-mediaserver_16.1-1_amd64.tar.gz in Proxmox 7.2-11. All was running fine up to may be 2 weeks ago when I saw that there was an update for Jellyfin, but I can not install/upgrade it.


# apt update
1 package can be upgraded. Run 'apt list --upgradable' to see it.

# apt upgrade
Reading package lists... Done
Building dependency tree 
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

# apt list –upgradable
Listing... Done
jellyfin/unknown 10.8.7-1 all [upgradable from: 10.8.4-1]
N: There is 1 additional version. Please use the '-a' switch to see it

# apt list --upgradable -a
Listing... Done
jellyfin/unknown 10.8.7-1 all [upgradable from: 10.8.4-1]
jellyfin/now 10.8.4-1 all [installed,upgradable to: 10.8.7-1]

# apt update && apt install jellyfin
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
jellyfin : Depends: jellyfin-server (>= 10.8.7-1) but 10.8.4-1 is to be installed
Depends: jellyfin-web (>= 10.8.7-1) but 10.8.4-1 is to be installed
E: Unable to correct problems, you have held broken packages.


What can I do to resolve this? Thanks.

Forum: 
Tags: 
Jeremy Davis's picture

Hi Aero. Welcome to TurnKey.

I'm not 100% sure, but I'm guessing that there is some additional dependency that it's not pulling in automatically for some reason?

So please try again, but this time explicitly install the dependency versions noted first. I.e.:

apt install -y jellyfin-server=10.8.7-1 jellyfin-web=10.8.7-1
apt install -y jellyfin

Hopefully that does the trick. If not, please post back with the output of the above commands.

aero's picture

That did it. Thanks a lot. I will remember the next time this might happen.

Jeremy Davis's picture

Awesome! Glad to hear you're up and running again...

The only thing that occurs to me is that perhaps this is being caused by our Jellyfin package pinning? When I get a chance, I'll have a closer look and if I find anything of interest, I'll try to remember to post back.

Timmy's picture

Hey Jeremy-

Had to perform this procedure for 17.1 mediaserver install and manually update w/ 10.8.10-1

So looks like its still an issue with updates.

Jeremy Davis's picture

Hi Timmy. I was under the impression that this issue was fixed in our v17.1 release? And on face value, it does appear to be.

Please excuse this stream of consciousnesses post. I figured I'd take you along on my investigations... So here we go, starting at the start:

To test I just launched the v17.1 LXC container (on my Proxmox v7.x host) and initially I thought that I couldn't reproduce the issue you're reporting?

root@JED-TEST-mediaserver ~# apt update
Hit:1 http://deb.debian.org/debian bullseye InRelease
Hit:2 http://security.debian.org bullseye-security InRelease                           
Hit:3 https://repo.jellyfin.org/debian bullseye InRelease                              
Ign:4 http://archive.turnkeylinux.org/debian bullseye-security InRelease
Ign:5 http://archive.turnkeylinux.org/debian bullseye InRelease
Hit:6 http://archive.turnkeylinux.org/debian bullseye-security Release
Hit:8 http://archive.turnkeylinux.org/debian bullseye Release
Reading package lists... Done                             
Building dependency tree... Done
Reading state information... Done
63 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@JED-TEST-mediaserver ~# apt policy jellyfin
jellyfin:
  Installed: 10.8.4-1
  Candidate: 10.8.10-1
  Version table:
     10.8.10-1 500
         10 https://repo.jellyfin.org/debian bullseye/main amd64 Packages
 *** 10.8.4-1 100
        100 /var/lib/dpkg/status
root@JED-TEST-mediaserver ~# apt install jellyfin
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be upgraded:
  jellyfin
1 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
Need to get 2260 B of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 https://syd1.mirror.jellyfin.org/debian bullseye/main amd64 jellyfin all 10.8.10-1 [2260 B]
Fetched 2260 B in 1s (1655 B/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 41191 files and directories currently installed.)
Preparing to unpack .../jellyfin_10.8.10-1_all.deb ...
Unpacking jellyfin (10.8.10-1) over (10.8.4-1) ...
Setting up jellyfin (10.8.10-1) ...
Enumerating objects: 1611, done.
Counting objects: 100% (1611/1611), done.
Delta compression using up to 2 threads
Compressing objects: 100% (998/998), done.
Writing objects: 100% (1611/1611), done.
Total 1611 (delta 94), reused 1611 (delta 94), pack-reused 0

However, digging a little deeper I remembered that there are actually a couple of other Jellyfin packages!:

root@JED-TEST-mediaserver ~# apt list jellyfin*
Listing... Done
jellyfin-ffmpeg5/now 5.1.1-1-bullseye amd64 [installed,local]
jellyfin-ffmpeg6/unknown 6.0-3-bullseye amd64
jellyfin-ffmpeg/unknown 4.4.1-4-bullseye amd64
jellyfin-server/now 10.8.4-1 amd64 [installed,local]
jellyfin-web/now 10.8.4-1 all [installed,local]
jellyfin/unknown,now 10.8.10-1 all [installed]

The 'local' in those packages (i.e. jellyfin-ffmpeg5, jellyfin-server & jellyfin-web) made me wonder what might be going on? So I checked:

root@JED-TEST-mediaserver ~# apt policy jellyfin-web
jellyfin-web:
  Installed: 10.8.4-1
  Candidate: 10.8.4-1
  Version table:
     10.8.10-1 10
         10 https://repo.jellyfin.org/debian bullseye/main amd64 Packages
 *** 10.8.4-1 100
        100 /var/lib/dpkg/status

Hmm, there's a newer version, but it's not going to be installed because it's pin value is only '10' (the currently installed version is '100' so packages need to be '100' or higher to be auto installed by 'apt upgrade'). That sounds like an issue with pinning! Let's check:

root@JED-TEST-mediaserver ~# cat /etc/apt/preferences.d/jellyfin.pref 
Package: *
Pin: origin "repo.jellyfin.org"
Pin-Priority: 10

Package: jellyfin
Pin: origin "repo.jellyfin.org"
Pin-Priority: 500

Ah ha! I can see the issue already! All 'Package's (i.e. '*') from the Jellyfin repo are pinned '10' (as an intended security measure - so only specific packages can be installed from this repo). Then the specific packages to allow are listed. In this case, only the jellyfin package itself is pinned '500'. We could manually list each individual package, but because of Jellyfin's package naming convention (thanks Jellyfin devs!) a better way is to set the 'Package' name to 'jellyfin*'. That will allow 'jellyfin' and all 'jellyfin-...' packages to be installable by default (so upgradeable via 'apt upgrade'). That doesn't undermine the security value of the pinning (e.g. you couldn't install a kernel package from the jellyfin repo), but also means that any new jellyfin-whatever packages will remain installable.

Here is a one liner to fix it - then run 'apt update':

sed -i '\|^Package: jellyfin$|s|$|*|' /etc/apt/preferences.d/jellyfin.pref
apt update

After doing that, the upgrades are now visible. E.g. jellyfin-web will now upgrade to 10.8.10-1:

jellyfin-web:
  Installed: 10.8.4-1
  Candidate: 10.8.10-1
  Version table:
     10.8.10-1 500
         10 https://repo.jellyfin.org/debian bullseye/main amd64 Packages
 *** 10.8.4-1 100
        100 /var/lib/dpkg/status

Or to see all available jellyfin* upgrades in a more compact way:

root@JED-TEST-mediaserver ~# apt list --upgradable jellyfin*
Listing... Done
jellyfin-ffmpeg5/unknown 5.1.3-2-bullseye amd64 [upgradable from: 5.1.1-1-bullseye]
jellyfin-server/unknown 10.8.10-1 amd64 [upgradable from: 10.8.4-1]
jellyfin-web/unknown 10.8.10-1 all [upgradable from: 10.8.4-1]

TBH it's a bit embarrassing as I suspect that this bug was a factor in the original issue and it's a pity that I've only just realised what was going on now. Anyway, at least we've worked it out now. Thanks again for reporting.

PS I've opened a new issue and noted the fix there too. I've also opened a pull request with the fix. We've shifted attention to v18.x now, so I'm not sure when a fixed appliance will be released, but hopefully v18.0 release is not too far away.

Timmy's picture

I'll have to run that script here after hours but glad to see its resolved.

Add new comment