I keep getting the following error message when running apt-get upgrade.
The following packages have been kept back: ffmpeg
Required Information
DietPi v8.18.2
Distro version | bookworm 0
Kernel version | Linux DietPi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux
Architecture | arm64
SBC model | RPi 4 Model B (aarch64)
Power supply used | (EG: 5V 1A RAVpower)
SD card used | (EG: SanDisk ultra)
Additional Information (if applicable)
Software title | Issue with ffmpeg
Steps to reproduce
Terminal Output
root@DietPi:~# apt update
Hit:1 https://deb.debian.org/debian bookworm InRelease
Hit:2 https://deb.debian.org/debian bookworm-updates InRelease
Hit:3 https://archive.raspberrypi.org/debian bullseye InRelease
Hit:4 https://deb.debian.org/debian-security bookworm-security InRelease
Hit:5 https://deb.debian.org/debian bookworm-backports InRelease
Hit:6 https://repo.jellyfin.org/debian bullseye InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.root@DietPi:~# apt list --upgradable
Listing... Done
ffmpeg/stable 8:4.3.6-0+deb11u1+rpt2 arm64 [upgradable from: 7:5.1.3-1]
N: There is 1 additional version. Please use the '-a' switch to see it
root@DietPi:~# apt list --upgradable -a
Listing... Done
ffmpeg/stable 8:4.3.6-0+deb11u1+rpt2 arm64 [upgradable from: 7:5.1.3-1]
ffmpeg/stable,now 7:5.1.3-1 arm64 [installed,upgradable to: 8:4.3.6-0+deb11u1+rpt2]
ā If you sent a ādietpi-bugreportā, please paste the ID here ā
Bug report ID | Reference code: 13d7588b-63bd-4089-b2d6-df575745ccad
root@DietPi:~# apt update
Hit:1 https://deb.debian.org/debian bookworm InRelease
Hit:2 https://archive.raspberrypi.org/debian bullseye InRelease
Get:3 https://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Hit:4 https://deb.debian.org/debian-security bookworm-security InRelease
Get:5 https://deb.debian.org/debian bookworm-backports InRelease [49.7 kB]Get:6 https://repo.jellyfin.org/debian bullseye InRelease [6639 B]
Fetched 108 kB in 4s (27.5 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
root@DietPi:~# apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
ffmpeg
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@DietPi:~# apt full-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
ffmpeg
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@DietPi:~# apt install ffmpeg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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:
ffmpeg : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt2)
Depends: libavfilter7 (= 8:4.3.6-0+deb11u1+rpt2)
libavdevice58 : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt2)
Depends: libavfilter7 (= 8:4.3.6-0+deb11u1+rpt2)
libavformat58 : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt2)
Depends: libsrt1.4-gnutls (>= 1.4.2) but it is not installable
E: Unable to correct problems, you have held broken packages.
This is quite strange, your system is running Debian Bookworm, but Debian Bullseye packages (deb11u1) seem to be installed. This will certainly not work.
I guess the Raspberry repository is causing the issue.
@MichaIng We have the Raspberry repository on Bullseye for a reason, because they donāt offer bookworm packages yet. This now causes some conflicts for ffmpeg
This has nothing to do with the guide directly. It is a side effect of your system running Debian Bookworm and the fact that the RPi guys have not yet offered Bookworm packages. This now causes a conflict.
I think thatās something we need to think about how we work around.
Nothing has changed either on our side or on Raspbianās side. It has only disappeared on your system because you deleted ffmpeg before. This means that it is not installed on your system. Just test it with
As already mentioned, this is a problem of the Raspbian package server, as it does not yet offer Bookworm packages. Therefore, we have kept it on Bullseye for the time being. However, this now causes conflicts for ffmpeg.
This is not really a workaround or solution. As mentioned above, the Raspbian repository for Bookworm is still empty and does not provide any packages. Therefore, you have no problem now, as nothing is downloaded from the RPi site. You just use the default Debian version from the global Debian repository. We kept the RPi Bullseye repository for a reason, to allow further kernel updates that are currently not available in the RPi Bookworm repository.
Do not switch to Bookworm suite of the RPi repo, as then youāll get no security updates for firmware, kernel etc.
Hmm, the problem is the dependency on libsrt1.4-gnutls, while Bookworm ships libsrt1.5-gnutls. I wonder why this was not an issue a week ago when we made all the install tests. Probably the FFmpeg package update from last Friday on the RPi repo introduced the issue. The Debian package however has this dependency at least since April already, so that alone would have caused the same issue on our tests: Debian -- Details of package libavformat58 in bullseye
Two possible solutions:
Enforcing the use of FFmpeg from Debian/Raspbian via APT pinning:
RPi GPU hardware acceleration should work fine, FFmpeg however is older, actually too old to install Home Assistant.
Now that I think about it: We needed to disable the Home Assistant install option on 32-bit ARM Bullseye systems because it requires at least FFmpeg 4.4 to compile the new ha-av Python module while Bullseye ships v4.3. This means that also on RPi, the Bookworm FFmpeg v5.1.3 was installed, not the one from the RPi repo. Probably the they raised the epoch version to 8 just with this update last Friday.
So weāll fix it with option 1 in dietpi-software. Nasty that DietPi v8.19 was just released. A live patch is possible but at least nasty with multiple lines or a very long line to patch into the script .
I have the same problem on dietpi v8.19 aarch64 (raspberry pi 4):
root@DietPi:~# apt upgrade ffmpeg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
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:
ffmpeg : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt2)
Depends: libavfilter7 (= 8:4.3.6-0+deb11u1+rpt2)
libavdevice58 : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt2)
Depends: libavfilter7 (= 8:4.3.6-0+deb11u1+rpt2)
libavformat58 : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt2)
Depends: libsrt1.4-gnutls (>= 1.4.2) but it is not installable
E: Broken packages
root@DietPi:~# apt -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
After installing ibsrt1.4-gnutls as in the previous post, the error is:
root@DietPi:/tmp# apt upgrade ffmpeg Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
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:
ffmpeg : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt2)
Depends: libavfilter7 (= 8:4.3.6-0+deb11u1+rpt2)
libavdevice58 : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt2)
Depends: libavfilter7 (= 8:4.3.6-0+deb11u1+rpt2)
libavformat58 : Depends: libavcodec58 (= 8:4.3.6-0+deb11u1+rpt2)
E: Broken packages