Score:0

Unable to install ffmpeg in Bionic, and held packages

ng flag

I used to have ffmpeg installed on my system, but somehow – I don’t know how or when – it got uninstalled. So, I tried installing ffmpeg via Synaptic. But when I mark it for installation, it gets the red exclamation mark indicating a broken package.

As I looked into this, I also discovered that in the past few days my system says that I have three packages that are “kept back”, and, although the system says they are ready to be updated, they never do update. The three packages are:

libavcodec58
libavutil56
libswresample3

sudo apt list –upgradable gives this result:

libavcodec58/bionic 7:4.3-2~18.04.york0 amd64 [upgradable from: 7:4.1.3-0ppa1~18.04]
libavutil56/bionic 7:4.3-2~18.04.york0 amd64 [upgradable from: 7:4.1.3-0ppa1~18.04]
libswresample3/bionic 7:4.3-2~18.04.york0 amd64 [upgradable from: 7:4.1.3-0ppa1~18.04]

sudo apt upgrade gives this result:

The following packages have been kept back:  
 libavutil56 libswresample3
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.  

I had the idea to just uninstall those three packages, and then try reinstalling them, but….. I didn’t do that, uninstalling any one of them via Synaptic gave me a message that a LONG list of packages would also be uninstalled – basically, every multimedia application I have, such as Audacity, VLC, etc.

I’ve been reading LOTS of answers to others’ questions on this and other sites, but unfortunately they all leave me even more confused about what is wrong and what to do. So, I turn here for help.

Why am I not able to upgrade these three packages? How do I fix that problem?

How do I install ffmpeg from Synaptic without getting a broken package error message?

Output of sudo apt-get --reinstall install libavcodec58 libavutil56 libswresample3:

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:
 libavcodec58 : Depends: libx264-155 but it is not installable
E: Unable to correct problems, you have held broken packages.

Output of apt-cache policy libavcodec58 libavutil56 libswresample3:

libavcodec58:
  Installed: 7:4.1.3-0ppa1~18.04
  Candidate: 7:4.3-2~18.04.york0
  Version table:
     7:4.3-2~18.04.york0 500
        500 http://ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu bionic/main amd64 Packages
 *** 7:4.1.3-0ppa1~18.04 500
        500 http://ppa.launchpad.net/cybermax-dexter/sdl2-backport/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
libavutil56:
  Installed: 7:4.1.3-0ppa1~18.04
  Candidate: 7:4.3-2~18.04.york0
  Version table:
     7:4.3-2~18.04.york0 500
        500 http://ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu bionic/main amd64 Packages
 *** 7:4.1.3-0ppa1~18.04 500
        500 http://ppa.launchpad.net/cybermax-dexter/sdl2-backport/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status
libswresample3:
  Installed: 7:4.1.3-0ppa1~18.04
  Candidate: 7:4.3-2~18.04.york0
  Version table:
     7:4.3-2~18.04.york0 500
        500 http://ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu bionic/main amd64 Packages
 *** 7:4.1.3-0ppa1~18.04 500
        500 http://ppa.launchpad.net/cybermax-dexter/sdl2-backport/ubuntu bionic/main amd64 Packages
        100 /var/lib/dpkg/status

output of sudo apt upgrade:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libavutil56 libswresample3
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

output of sudo apt update:

Ign:1 http://download.webmin.com/download/repository sarge InRelease
Ign:2 http://linux.dropbox.com/ubuntu bionic InRelease                         
Hit:3 https://updates.signal.org/desktop/apt xenial InRelease                  
Hit:4 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease                
Hit:5 http://security.ubuntu.com/ubuntu bionic-security InRelease              
Hit:6 http://download.webmin.com/download/repository sarge Release             
Hit:7 https://brave-browser-apt-release.s3.brave.com bionic InRelease          
Hit:8 https://headsetapp.co/headset-electron/debian stable InRelease           
Hit:9 http://download.opensuse.org/repositories/home:/stevenpusser/xUbuntu_18.04  InRelease
Hit:10 http://download.onlyoffice.com/repo/debian squeeze InRelease            
Hit:11 http://archive.ubuntu.com/ubuntu bionic InRelease                       
Hit:12 https://www.collaboraoffice.com/repos/CollaboraOnline/CODE-ubuntu1804 ./ InRelease
Hit:13 http://download.opensuse.org/repositories/network:/messaging:/xmpp:/dino/xUbuntu_18.04  InRelease
Hit:14 http://repository.spotify.com stable InRelease                          
Hit:15 http://archive.ubuntu.com/ubuntu bionic-updates InRelease               
Hit:16 https://download.virtualbox.org/virtualbox/debian bionic InRelease      
Hit:17 http://linux.dropbox.com/ubuntu bionic Release                          
Hit:19 http://ppa.launchpad.net/morphis/anbox-support/ubuntu bionic InRelease  
Hit:20 https://download.mono-project.com/repo/ubuntu stable-bionic InRelease   
Hit:21 https://repo.skype.com/deb stable InRelease                             
Hit:23 http://ppa.launchpad.net/agornostal/ulauncher/ubuntu bionic InRelease   
Hit:24 https://ocean.surfshark.com/debian stretch InRelease                    
Ign:25 http://repo.vivaldi.com/stable/deb stable InRelease                     
Hit:27 http://repo.vivaldi.com/stable/deb stable Release                       
Hit:28 http://ppa.launchpad.net/alexlarsson/flatpak/ubuntu bionic InRelease    
Hit:29 http://ppa.launchpad.net/andreasbutti/xournalpp-master/ubuntu bionic InRelease
Hit:30 http://dl.google.com/linux/chrome/deb stable InRelease                  
Hit:31 http://dl.google.com/linux/earth/deb stable InRelease                   
Hit:32 http://deb.torproject.org/torproject.org bionic InRelease               
Hit:33 http://ppa.launchpad.net/atareao/atareao/ubuntu bionic InRelease        
Hit:34 https://packages.microsoft.com/repos/ms-teams stable InRelease          
Hit:35 http://ppa.launchpad.net/atareao/telegram/ubuntu bionic InRelease       
Get:36 https://mega.nz/linux/MEGAsync/xUbuntu_18.04 ./ InRelease [2,473 B]     
Hit:37 https://linux.teamviewer.com/deb stable InRelease                       
Hit:38 http://ppa.launchpad.net/audio-recorder/ppa/ubuntu bionic InRelease     
Hit:39 https://linux.teamviewer.com/deb preview InRelease                 
Hit:40 http://shop.softmaker.com/repo/apt wheezy InRelease                     
Hit:41 http://ppa.launchpad.net/bit-team/stable/ubuntu bionic InRelease        
Hit:42 http://ppa.launchpad.net/cybermax-dexter/sdl2-backport/ubuntu bionic InRelease
Hit:43 https://wire-app.wire.com/linux/debian stable InRelease            
Hit:44 http://ppa.launchpad.net/cybolic/vineyard-testing/ubuntu bionic InRelease
Hit:45 http://ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu bionic InRelease
Get:46 https://dl.yarnpkg.com/debian stable InRelease [17.1 kB]                
Hit:48 http://ppa.launchpad.net/diesch/stable/ubuntu bionic InRelease          
Hit:49 http://ppa.launchpad.net/gerardpuig/ppa/ubuntu bionic InRelease         
Hit:18 https://packagecloud.io/firstlookmedia/code/ubuntu bionic InRelease     
Hit:50 http://ppa.launchpad.net/i2p-maintainers/i2p/ubuntu bionic InRelease    
Hit:51 http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu bionic InRelease
Hit:52 http://ppa.launchpad.net/mikhailnov/pulseeffects/ubuntu bionic InRelease
Hit:54 http://ppa.launchpad.net/nextcloud-devs/client/ubuntu bionic InRelease
Hit:22 https://packages.riot.im/debian bionic InRelease                   
Hit:55 http://ppa.launchpad.net/nilarimogard/webupd8/ubuntu bionic InRelease
Hit:56 http://ppa.launchpad.net/noobslab/apps/ubuntu bionic InRelease
Hit:57 http://ppa.launchpad.net/openshot.developers/ppa/ubuntu bionic InRelease
Hit:58 http://ppa.launchpad.net/peek-developers/stable/ubuntu bionic InRelease
Hit:59 http://ppa.launchpad.net/phoerious/keepassxc/ubuntu bionic InRelease
Hit:60 http://ppa.launchpad.net/photoflare/photoflare-stable/ubuntu bionic InRelease
Hit:61 http://ppa.launchpad.net/psi-plus/ppa/ubuntu bionic InRelease
Hit:62 http://ppa.launchpad.net/rvm/smplayer/ubuntu bionic InRelease
Hit:63 http://ppa.launchpad.net/sandromani/gimagereader/ubuntu bionic InRelease
Hit:64 http://ppa.launchpad.net/stebbins/handbrake-releases/ubuntu bionic InRelease
Get:65 http://ppa.launchpad.net/system76-dev/stable/ubuntu bionic InRelease [15.4 kB]
Hit:66 http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic InRelease         
Hit:67 http://ppa.launchpad.net/thomas.tsai/ubuntu-tuxboot/ubuntu bionic InRelease
Hit:68 http://ppa.launchpad.net/ubuntuhandbook1/apps/ubuntu bionic InRelease   
Hit:69 http://ppa.launchpad.net/ubuntuhandbook1/cantata-qt/ubuntu bionic InRelease
Hit:70 http://ppa.launchpad.net/ubuntuhandbook1/corebird/ubuntu bionic InRelease
Hit:71 http://ppa.launchpad.net/ufleisch/kid3/ubuntu bionic InRelease          
Hit:72 http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu bionic InRelease
Hit:73 http://ppa.launchpad.net/yg-jensge/shotwell/ubuntu bionic InRelease     
Hit:74 http://ppa.launchpad.net/yktooo/ppa/ubuntu bionic InRelease             
Fetched 35.0 kB in 13s (2,664 B/s)                                             
Reading package lists... Done
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
Nmath avatar
ng flag
Try `sudo apt update` followed by `sudo apt-get --reinstall install libavcodec58 libavutil56 libswresample3` and report back
N0rbert avatar
zw flag
Please add output of `apt-cache policy libavcodec58 libavutil56 libswresample3` to the question. Do you really need PPA to get newer versions of these packages?
dln949 avatar
ng flag
@Nmath: I have added the output to my original question.
dln949 avatar
ng flag
@N0rbert: I have added the output to my original question. Regarding your question about the PPA: Sadly, I do not know the answer - The PPAs were added so very long ago, I don't recall why they were originally added.
Nmath avatar
ng flag
OK it appears that you have preexisting problems with your package management other than just these packages. Can you also include the full output of `sudo apt update` and `sudo apt upgrade`? When is the last time that you were able to successfully update/upgrade your software without any errors? In future posts/edits, please use code fences to properly format terminal output so that we can accurately parse the information. See the [edit history](https://askubuntu.com/posts/1360842/revisions) or the [help center](https://askubuntu.com/editing-help)
dln949 avatar
ng flag
@Nmath I have added your requested information to my original question. The last time I had a ssuceesful update/upgrade was about one week ago.
Artur Meinild avatar
vn flag
Does this answer your question? [How do I resolve unmet dependencies after adding a PPA?](https://askubuntu.com/questions/140246/how-do-i-resolve-unmet-dependencies-after-adding-a-ppa)
Organic Marble avatar
us flag
I had this same problem with ffmpeg from the ubuntu handbook ppa. I use the versions of rhythmbox and ksnip from there, and this ffmpeg thing showed up and would have broken my system. I used pinning to accept only the packages I want from the ppa and all is well again. tl;dr the version of ffmpeg in the ubuntu handbook ppa breaks 18.04
Nmath avatar
ng flag
You have an outrageous amount of PPAs added to your system. Do you know what they are all for and are you using all of them? Software in PPAs are not official Ubuntu software and are not tested or maintained by Ubuntu. They can cause lots of problems and conflicts especially if the software is not maintained and kept up-to-date. Beyond that they might just be unsafe to use. See: [Are PPAs safe to add to my system...](https://askubuntu.com/q/35629). My suggestion is to backup & audit your sources and remove unused and unnecessary PPAs. In general, software in repos is always preferred over PPA.
karel avatar
sa flag
Does this answer your question? [Unable to correct problems, you have held broken packages](https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages)
Score:3
zw flag

You have to purge problematic PPAs by

sudo apt-get install ppa-purge
sudo ppa-purge ppa:ubuntuhandbook1/apps
sudo ppa-purge ppa:cybermax-dexter/sdl2-backport

and then install all possible updates with newest dependencies by

sudo apt-get update
sudo apt-get dist-upgrade

and finally install ffmpeg package from official repository by

sudo apt-get install ffmpeg=3.4.8-0ubuntu0.2
dln949 avatar
ng flag
Thanks for your help with this, your answer solved my problem.
Score:-2
cn flag

Simply type the usual command to install the ffmpeg which is a tool for transcoding multimedia files.

sudo apt update && sudo apt upgrade 
sudo apt install ffmpeg

If you're facing the broken installation issue then type the usual command to fix the broken installation on your linux system.

sudo apt --fix-broken install

The 2nd method is from the SNAP, You Have on Your Ubuntu System.

sudo snap install ffmpeg

The 3rd method is from the Official Way which means the official website of ffmpeg where the whole installation manual is available for everyone who wants to install ffmpeg on their linux system.

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.