我想安装 ffmpeg,但收到以下消息。我该如何解决这个问题?
(base) h@cheemc52:~/opencv/build$ 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: libavcodec56 (>= 10:2.6.9) but it is not going to be installed
Depends: libavdevice56 (>= 10:2.6.9) but it is not going to be installed
Depends: libavfilter5 (>= 10:2.6.9) but it is not going to be installed
Depends: libavformat56 (>= 10:2.6.9) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我正在使用 Ubuntu 16.04
我怎么知道哪一个是正确的解决方案?
解决方案 1
(base) h@cheemc52:~$ sudo aptitude install ffmpeg
The following NEW packages will be installed:
ffmpeg libaacplus2{a} libass5{a} libavcodec56{ab} libavdevice56{a} libavfilter5{a} libavformat56{ab} libavresample2{a} libfaac0{a} libfdk-aac1{a}
libpostproc53{a} libswresample1{a} libutvideo15{a} libvidstab1.0{a} libvo-aacenc0{a} libvo-amrwbenc0{a} libx264-146{a} libx265-51{a}
0 packages upgraded, 18 newly installed, 0 to remove and 74 not upgraded.
Need to get 8,543 kB of archives. After unpacking 23.1 MB will be used.
The following packages have unmet dependencies:
libavformat56 : Depends: libgnutls-deb0-28 (>= 3.3.0) which is a virtual package and is not provided by any available package.
libavcodec56 : Depends: libvpx1 (>= 1.3.0) which is a virtual package and is not provided by any available package.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) ffmpeg [Not Installed]
2) libavcodec56 [Not Installed]
3) libavdevice56 [Not Installed]
4) libavfilter5 [Not Installed]
5) libavformat56 [Not Installed]
Accept this solution? [Y/n/q/?]
解决方案 2. 所有其他解决方案看起来与 2 类似。
The following actions will resolve these dependencies:
Install the following packages:
1) ffmpeg [7:2.8.15-0ubuntu0.16.04.1 (xenial-security, xenial-updates)]
2) libavdevice-ffmpeg56 [7:2.8.15-0ubuntu0.16.04.1 (xenial-security, xenial-updates)]
3) libavfilter-ffmpeg5 [7:2.8.15-0ubuntu0.16.04.1 (xenial-security, xenial-updates)]
4) libbs2b0 [3.1.0+dfsg-2.2 (xenial)]
5) libflite1 [2.0.0-release-1 (xenial)]
6) libopenal-data [1:1.16.0-3 (now, xenial)]
7) libopenal1 [1:1.16.0-3 (now, xenial)]
8) libpostproc-ffmpeg53 [7:2.8.15-0ubuntu0.16.04.1 (xenial-security, xenial-updates)]
Keep the following packages at their current version:
9) libavcodec56 [Not Installed]
10) libavdevice56 [Not Installed]
11) libavfilter5 [Not Installed]
12) libavformat56 [Not Installed]
Accept this solution? [Y/n/q/?] q