when installing ffmpeg with ubuntu20(fosal), it have conflict dependencies:
# sudo apt-get install ffmpeg
Reading package lists... Done
Building dependency tree
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: libavdevice58 (= 7:4.2.7-0ubuntu0.1) but it is not going to be installed
Depends: libavfilter7 (= 7:4.2.7-0ubuntu0.1)
Depends: libavformat58 (= 7:4.2.7-0ubuntu0.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I solved it by install the reason of conflit library with a specific version, may be someone will need the solution.
step 1. fix-broken
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
step2. find the reason of unmet dependencies:
# sudo apt install libavdevice58=7:4.2.7-0ubuntu0.1 libavfilter7=7:4.2.7-0ubuntu0.1 libavformat58=7:4.2.7-0ubuntu0.1
Reading package lists... Done
Building dependency tree
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:
libavformat58 : Depends: libchromaprint1 (>= 1.3.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Here the problem is from libchromaprint1
step3. find candidate versions of libchromaprint1(conflict reason)
# apt-cache policy libchromaprint1
libchromaprint1:
Installed: (none)
Candidate: 1.5.1-1~20.04.sav0
Version table:
1.5.1-1~20.04.sav0 500
500 http://ppa.launchpad.net/savoury1/multimedia/ubuntu focal/main amd64 Packages
1.4.3-3build1 500
500 http://mirrors.cloud.aliyuncs.com/ubuntu focal/universe amd64 Packages
500 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages
step4. install the old version of libchromaprint1 to solve the conflicts
# sudo apt install libchromaprint1=1.4.3-3build1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libchromaprint1
0 upgraded, 1 newly installed, 0 to remove and 223 not upgraded.
Need to get 37.6 kB of archives.
step5. reinstall ffmpeg
# sudo apt install ffmpeg
Reading package lists... Done
Building dependency tree
Reading state information... Done
Done. the reason of conflict is that the latest version of libraries have conflict, by install old version of the conflicted ones to solve it.
mojiang is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.