The following packages have been kept back: ffmpeg

Hi All

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

Expected behaviour

apt-get upgrade should upgrade system software

Actual behaviour

apt-get upgrade is not upgrading system software

Thanks for the support

Adam

can you share following

apt update
apt upgrade
apt full-upgrade
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.
apt install ffmpeg
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.
sudo apt-get clean ; sudo apt-get update ; sudo apt-get check ; sudo apt-get purge ffmpeg* -y ; sudo apt-get autoremove -y ; sudo apt-get -f satisfy ffmpeg -y

Here is the output from the commands.

root@DietPi:~# sudo apt-get clean
root@DietPi:~# sudo apt-get update
Hit:1 https://deb.debian.org/debian bookworm InRelease
Get:2 https://deb.debian.org/debian bookworm-updates InRelease [52.1 kB]
Hit:3 https://deb.debian.org/debian-security bookworm-security InRelease
Get:4 https://deb.debian.org/debian bookworm-backports InRelease [49.7 kB]Hit:5 https://archive.raspberrypi.org/debian bullseye InRelease
Get:6 https://repo.jellyfin.org/debian bullseye InRelease [6639 B]
Fetched 108 kB in 3s (34.1 kB/s)
Reading package lists... Done
root@DietPi:~#  apt-get check
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
root@DietPi:~# sudo apt-get purge ffmpeg* -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Note, selecting 'ffmpeg-doc' for glob 'ffmpeg*'
Note, selecting 'ffmpeg-gui' for glob 'ffmpeg*'
Note, selecting 'ffmpegfs' for glob 'ffmpeg*'
Note, selecting 'ffmpeg' for glob 'ffmpeg*'
Note, selecting 'ffmpeg2dirac' for glob 'ffmpeg*'
Note, selecting 'ffmpeg2theora' for glob 'ffmpeg*'
Note, selecting 'ffmpeg-dbgsym' for glob 'ffmpeg*'
Note, selecting 'ffmpegthumbnailer' for glob 'ffmpeg*'
Note, selecting 'ffmpegthumbs' for glob 'ffmpeg*'
Package 'ffmpeg2theora' is not installed, so not removed
Package 'ffmpeg-gui' is not installed, so not removed
Package 'ffmpeg2dirac' is not installed, so not removed
Package 'ffmpegthumbs' is not installed, so not removed
Package 'ffmpeg-doc' is not installed, so not removed
Package 'ffmpegfs' is not installed, so not removed
Package 'ffmpegthumbnailer' is not installed, so not removed
Package 'ffmpeg-dbgsym' is not installed, so not removed
The following packages were automatically installed and are no longer required:
  libasyncns0 libavc1394-0 libavdevice59 libavfilter8 libblas3 libbs2b0
  libcaca0 libcdio-cdda2 libcdio-paranoia2 libcdio19 libdbus-1-3
  libdc1394-25 libdecor-0-0 libdrm-amdgpu1 libdrm-nouveau2
  libdrm-radeon1 libepoxy0 libflite1 libgbm1 libgfortran5 libgl1
  libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0
  libiec61883-0 libjack-jackd2-0 liblapack3 liblilv-0-0 libllvm15
  libmysofa1 libopenal-data libopenal1 libplacebo208 libpocketsphinx3
  libpostproc56 libpulse0 libraw1394-11 librubberband2 libsdl2-2.0-0
  libsensors-config libsensors5 libserd-0-0 libsndfile1 libsndio7.0
  libsord-0-0 libsphinxbase3 libsratom-0-0 libswscale6 libvidstab1.1
  libvulkan1 libwayland-client0 libwayland-cursor0 libwayland-egl1
  libwayland-server0 libxcb-dri2-0 libxcb-glx0 libxcb-present0
  libxcb-randr0 libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcursor1
  libxi6 libxkbcommon0 libxrandr2 libxshmfence1 libxss1 libxv1
  libxxf86vm1 libz3-4 libzimg2 x11-common
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  ffmpeg*
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 2586 kB disk space will be freed.
(Reading database ... 29870 files and directories currently installed.)
Removing ffmpeg (7:5.1.3-1) ...
root@DietPi:~# sudo apt-get autoremove -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  libasyncns0 libavc1394-0 libavdevice59 libavfilter8 libblas3 libbs2b0
  libcaca0 libcdio-cdda2 libcdio-paranoia2 libcdio19 libdbus-1-3
  libdc1394-25 libdecor-0-0 libdrm-amdgpu1 libdrm-nouveau2
  libdrm-radeon1 libepoxy0 libflite1 libgbm1 libgfortran5 libgl1
  libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0
  libiec61883-0 libjack-jackd2-0 liblapack3 liblilv-0-0 libllvm15
  libmysofa1 libopenal-data libopenal1 libplacebo208 libpocketsphinx3
  libpostproc56 libpulse0 libraw1394-11 librubberband2 libsdl2-2.0-0
  libsensors-config libsensors5 libserd-0-0 libsndfile1 libsndio7.0
  libsord-0-0 libsphinxbase3 libsratom-0-0 libswscale6 libvidstab1.1
  libvulkan1 libwayland-client0 libwayland-cursor0 libwayland-egl1
  libwayland-server0 libxcb-dri2-0 libxcb-glx0 libxcb-present0
  libxcb-randr0 libxcb-shape0 libxcb-sync1 libxcb-xfixes0 libxcursor1
  libxi6 libxkbcommon0 libxrandr2 libxshmfence1 libxss1 libxv1
  libxxf86vm1 libz3-4 libzimg2 x11-common
0 upgraded, 0 newly installed, 74 to remove and 0 not upgraded.
After this operation, 235 MB disk space will be freed.
(Reading database ... 29835 files and directories currently installed.)
Removing libavdevice59:arm64 (7:5.1.3-1) ...
Removing libavfilter8:arm64 (7:5.1.3-1) ...
Removing libpocketsphinx3:arm64 (0.8+5prealpha+1-15) ...
Removing libsphinxbase3:arm64 (0.8+5prealpha+1-16) ...
Removing libsdl2-2.0-0:arm64 (2.26.5+dfsg-1) ...
Removing libpulse0:arm64 (16.1+dfsg1-2+b1) ...
Removing libasyncns0:arm64 (0.8-6+b3) ...
Removing libavc1394-0:arm64 (0.5.4-5) ...
Removing liblapack3:arm64 (3.11.0-2) ...
Removing libblas3:arm64 (3.11.0-2) ...
Removing libbs2b0:arm64 (3.1.0+dfsg-7) ...
Removing libcaca0:arm64 (0.99.beta20-3) ...
Removing libcdio-paranoia2:arm64 (10.2+2.0.1-1) ...
Removing libcdio-cdda2:arm64 (10.2+2.0.1-1) ...
Removing libcdio19:arm64 (2.1.0-4) ...
Removing libdbus-1-3:arm64 (1.14.6-1) ...
Removing libdc1394-25:arm64 (2.2.6-4) ...
Removing libdecor-0-0:arm64 (0.1.1-2) ...
Removing libgl1:arm64 (1.6.0-1) ...
Removing libglx0:arm64 (1.6.0-1) ...
Removing libglx-mesa0:arm64 (22.3.6-1+deb12u1) ...
Removing libgl1-mesa-dri:arm64 (22.3.6-1+deb12u1) ...
Removing libdrm-amdgpu1:arm64 (2.4.114-1+b1) ...
Removing libdrm-nouveau2:arm64 (2.4.114-1+b1) ...
Removing libdrm-radeon1:arm64 (2.4.114-1+b1) ...
Removing libplacebo208:arm64 (4.208.0-3) ...
Removing libepoxy0:arm64 (1.5.10-1) ...
Removing libflite1:arm64 (2.2-5) ...
Removing libgbm1:arm64 (22.3.6-1+deb12u1) ...
Removing libgfortran5:arm64 (12.2.0-14) ...
Removing libglapi-mesa:arm64 (22.3.6-1+deb12u1) ...
Removing libglvnd0:arm64 (1.6.0-1) ...
Removing libiec61883-0:arm64 (1.2.0-6+b1) ...
Removing libjack-jackd2-0:arm64 (1.9.21~dfsg-3) ...
Removing liblilv-0-0:arm64 (0.24.14-1) ...
Removing libllvm15:arm64 (1:15.0.6-4+b1) ...
Removing libmysofa1:arm64 (1.3.1~dfsg0-1) ...
Removing libopenal1:arm64 (1:1.19.1-2) ...
Removing libopenal-data (1:1.19.1-2) ...
Removing libpostproc56:arm64 (7:5.1.3-1) ...
Removing libraw1394-11:arm64 (2.1.2-2) ...
Removing librubberband2:arm64 (3.1.2+dfsg0-1) ...
Removing libsensors5:arm64 (1:3.6.0-7.1) ...
Removing libsensors-config (1:3.6.0-7.1) ...
Removing libsratom-0-0:arm64 (0.6.14-1) ...
Removing libsord-0-0:arm64 (0.16.14+git221008-1) ...
Removing libserd-0-0:arm64 (0.30.16-1) ...
Removing libsndfile1:arm64 (1.2.0-1) ...
Removing libsndio7.0:arm64 (1.9.0-0.3+b2) ...
Removing libswscale6:arm64 (7:5.1.3-1) ...
Removing libvidstab1.1:arm64 (1.1.0-2+b1) ...
Removing libvulkan1:arm64 (1.3.239.0-1) ...
Removing libwayland-cursor0:arm64 (1.21.0-1) ...
Removing libwayland-client0:arm64 (1.21.0-1) ...
Removing libwayland-egl1:arm64 (1.21.0-1) ...
Removing libwayland-server0:arm64 (1.21.0-1) ...
Removing libxcb-dri2-0:arm64 (1.15-1) ...
Removing libxcb-glx0:arm64 (1.15-1) ...
Removing libxcb-present0:arm64 (1.15-1) ...
Removing libxcb-randr0:arm64 (1.15-1) ...
Removing libxcb-shape0:arm64 (1.15-1) ...
Removing libxcb-sync1:arm64 (1.15-1) ...
Removing libxcb-xfixes0:arm64 (1.15-1) ...
Removing libxcursor1:arm64 (1:1.2.1-1) ...
Removing libxi6:arm64 (2:1.8-1+b1) ...
Removing libxkbcommon0:arm64 (1.5.0-1) ...
Removing libxrandr2:arm64 (2:1.5.2-2+b1) ...
Removing libxshmfence1:arm64 (1.3-1) ...
Removing libxss1:arm64 (1:1.2.3-1) ...
Removing libxv1:arm64 (2:1.0.11-1.1) ...
Removing libxxf86vm1:arm64 (1:1.1.4-1+b2) ...
Removing libz3-4:arm64 (4.8.12-3.1) ...
Removing libzimg2:arm64 (3.0.4+ds1-1) ...
Removing x11-common (1:7.7+23) ...
Processing triggers for libc-bin (2.36-9) ...
root@DietPi:~# sudo apt-get -f satisfy ffmpeg -y
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 :roll_eyes:

I used this guide to upgrade to Debian Bookworm

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.

Upgraded to DietPi v8.19.1 the issue has now been resolved.

Thanks for the support it’s very much appreciated.

Adam

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

apt install ffmpeg

hey guys, I’ve installed a fresh DietPi v8.19.1 yesterday in my rpi3b+ and I’m experiencing same error mentioned here

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

This happens while trying to install the Allo Web UI with dependencies. I haven’t touched anything in apt sources, all freshly installed.

any ideas?

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.

So I edited

/etc/apt/sources.list.d/raspi.list

and replaced

deb https://archive.raspberrypi.org/debian/ bullseye main

by

deb https://archive.raspberrypi.org/debian/ bookworm main

and it worked! I was able to do apt get ffmpeg successfully

is this a bug? why isn’t the image being ship with this configuration by default?

@bgx22 Thanks this also worked like a charm for me

1 Like

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:

  1. Enforcing the use of FFmpeg from Debian/Raspbian via APT pinning:

    cat << '_EOF_' > /etc/apt/preferences.d/dietpi-ffmpeg
    Package: ffmpeg* libav* libpostproc* libsw*
    Pin: origin archive.raspberrypi.org
    Pin-Priority: -1
    _EOF_
    

    One will get a newer version, but probably no full GPU acceleration on RPi.

  2. Installing the missing libsrt1.4-gnutls manually:

    • On Raspbian/ARMv6/32-bit:
      cd /tmp
      curl -Lo package.deb 'http://raspbian.raspberrypi.org/raspbian/pool/main/s/srt/libsrt1.4-gnutls_1.4.2-1.3_armhf.deb'
      apt install ./package.deb
      rm package.deb
      
    • On Debian/ARMv7/32-bit:
      cd /tmp
      curl -Lo package.deb 'https://deb.debian.org/debian/pool/main/s/srt/libsrt1.4-gnutls_1.4.2-1.3_armhf.deb'
      apt install ./package.deb
      rm package.deb
      
    • On Debian/ARMv8/64-bit:
      cd /tmp
      curl -Lo package.deb 'https://deb.debian.org/debian/pool/main/s/srt/libsrt1.4-gnutls_1.4.2-1.3_arm64.deb'
      apt install ./package.deb
      rm package.deb
      

    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 :thinking:.

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

Did you executed point 1 from above as well?