Score:5

trying to (re-)install ffmpeg, but unmet dependencies

cn flag

I previously tried to follow https://ubuntuhandbook.org/index.php/2022/02/install-ffmpeg-5-0-ubuntu/ in installing ffmpeg 5 on ubuntu 20.04 LTS, that did not work. Now I have upgraded to Ubuntu 22.04.2 LTS (which came with its own problems). and I still can not correctly install ffmpeg;

sudo 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 (= 7:4.4.2-0ubuntu0.22.04.1)
          Depends: libavdevice58 (= 7:4.4.2-0ubuntu0.22.04.1) but 7:4.4.3-0ubuntu1~20.04.sav2 is to be installed
          Depends: libavfilter7 (= 7:4.4.2-0ubuntu0.22.04.1)
          Depends: libavformat58 (= 7:4.4.2-0ubuntu0.22.04.1)
          Depends: libavutil56 (= 7:4.4.2-0ubuntu0.22.04.1) but 7:4.4.3-0ubuntu1~20.04.sav2 is to be installed
          Depends: libpostproc55 (= 7:4.4.2-0ubuntu0.22.04.1) but 7:4.4.3-0ubuntu1~20.04.sav2 is to be installed
          Depends: libswresample3 (= 7:4.4.2-0ubuntu0.22.04.1) but 7:4.4.3-0ubuntu1~20.04.sav2 is to be installed
          Depends: libswscale5 (= 7:4.4.2-0ubuntu0.22.04.1) but 7:4.4.3-0ubuntu1~20.04.sav2 is to be installed
E: Unable to correct problems, you have held broken packages.

What is happening that apt is trying to install dependencies for version 20 when I now have version 22?

Score:1
cn flag

following suggested question advice form https://askubuntu.com/a/60314/1030659 sudo aptitude install ffmpeg let me select the unmet dependencies and "downgrade" from the ubuntu20 versions to ubuntu22 versions. I now have a regularly installed ffmpeg ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers

however this is sadly still not ffmpeg version 5, but this does solve my troubles.

JJGabe avatar
gh flag
Did you try installing the dependencies individually? e.g. `sudo apt install libavdevice58`
josh avatar
cn flag
Yes, but that gave me the same kind of dependency issues, which I don't know how to resolve
tn flag
I see a lot of dependencies. Any hint on which dependencies you installed?
josh avatar
cn flag
while using aptitude i selected all of the suggestions
Score:0
de flag

The Savoury FFmpeg5 PPA now says I quote :

*** Install ***

FFmpeg builds here depend on the public FFmpeg PPA (ppa:savoury1/ffmpeg4), and the new private FFmpeg PPA (ppa:savoury1/ffmpeg) for installation. Any who have donated can contact me requesting access to the private PPA. Once you have been granted private PPA access do these steps for installation:

sudo add-apt-repository ppa:savoury1/ffmpeg4
sudo add-apt-repository ppa:savoury1/ffmpeg5
sudo apt-get update
sudo apt-get upgrade && sudo apt-get dist-upgrade
sudo apt-get install ffmpeg

Therefore one needs to donate to the author and then contact him (Rob Savoury) to be given the access to his ppa:savoury1/ffmpeg private PPA into your launchpad subscriptions. This private PPA is needed to install ffmpeg and its dependencies :

$ listInstalledPackagesFromRepo savoury1/ffmpeg
ffmpeg
libavcodec58
libavdevice58
libavfilter7
libavformat58
libavutil56
libde265-0
libdjvulibre-text
libdjvulibre21
libglslang12
libheif1
libilbc3
libjasper7
liblerc-dev
liblerc3
libplacebo264
libpostproc55
librav1e0
libraw20
librist4
libshaderc1
libsvtav1enc1
libswresample3
libswscale5
libtiff-dev
libtiff5
libtiffxx5
libvapoursynth
libvapoursynth-script0
libvmaf1
libvulkan1
libzip4
vapoursynth-python3
vulkan-tools
$ /usr/bin/ffmpeg -version
ffmpeg version 5.1.3-0ubuntu1~20.04.sav0 Copyright (c) 2000-2022 the FFmpeg developers
built with gcc 9 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
configuration: --prefix=/usr --extra-version='0ubuntu1~20.04.sav0' --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-amf --enable-gnutls --enable-ladspa --enable-lcms2 --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-sndio --enable-pocketsphinx --enable-librsvg --enable-libdav1d --enable-libilbc --enable-libjxl --enable-librist --enable-vapoursynth --enable-libvmaf --enable-libzimg --enable-crystalhd --enable-libmfx --enable-libsvtav1 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-libplacebo --enable-librav1e --enable-shared
libavutil      57. 28.100 / 57. 28.100
libavcodec     59. 37.100 / 59. 37.100
libavformat    59. 27.100 / 59. 27.100
libavdevice    59.  7.100 / 59.  7.100
libavfilter     8. 44.100 /  8. 44.100
libswscale      6.  7.100 /  6.  7.100
libswresample   4.  7.100 /  4.  7.100
libpostproc    56.  6.100 / 56.  6.100
$
Score:0
us flag
joe

I used a combination of this thread and some help from ChatGPT-4, and got it fixed using these commands:

# remove the savory1 PPA:
sudo rm /etc/apt/sources.list.d/savoury1-ubuntu-ffmpeg*

# not sure if these were necessary, but can't hurt
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

# manually install the packages over the existing savory1 ones:
sudo apt-get install libavcodec58=7:4.4.2-0ubuntu0.22.04.1
sudo apt-get install libavdevice58=7:4.4.2-0ubuntu0.22.04.1
sudo apt-get install libavfilter7=7:4.4.2-0ubuntu0.22.04.1
sudo apt-get install libavformat58=7:4.4.2-0ubuntu0.22.04.1
sudo apt-get install libavutil56=7:4.4.2-0ubuntu0.22.04.1
sudo apt-get install libpostproc55=7:4.4.2-0ubuntu0.22.04.1
sudo apt-get install libswresample3=7:4.4.2-0ubuntu0.22.04.1
sudo apt-get install libswscale5=7:4.4.2-0ubuntu0.22.04.1

# install ffmpeg
sudo apt-get install ffmpeg

It's apparently because the savory1 guy decided to start charging people for his PPA, but I really have no idea.

UPDATE (24 Mar 2023): The PPAs at this Launchpad site are now moving to a subscriber only (those who have donated) system. Given how many people and businesses are using these PPAs that I've put thousands of hours of energy into creating, and given the tiny amount of donations from all those many people and businesses, it is now necessary for the sake of my survival to restrict access to the most popular software at these PPAs to supporters.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.