ffmpeg 未满足的依赖项

ffmpeg 未满足的依赖项

最近,我在尝试在 Ubuntu 电脑上安装 ffmpeg 时遇到了一个问题。我运行的是 Ubuntu 11.10 64 位,安装了所有最新更新,系统运行正常,但我觉得需要录制我的桌面,而且我读过很多文章说 ffmpeg 是最好的录制工具之一(除了提供视频包外),所以我尝试运行

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:
 libavcodec53 (< 4:0.7.3-99) but it is not going to be installed or
                    libavcodec-extra-53 (< 4:0.7.3.99) but 4:0.8.0.1~ppa2 is to be installed
           Depends: libavdevice53 (>= 4:0.7.3-0ubuntu0.11.10.1) but it is not going to be installed or
                    libavdevice-extra-53 (>= 4:0.7.3) but it is not going to be installed
           Depends: libavdevice53 (< 4:0.7.3-99) but it is not going to be installed or
                    libavdevice-extra-53 (< 4:0.7.3.99) but it is not going to be installed
           Depends: libavfilter2 (>= 4:0.7.3-0ubuntu0.11.10.1) but it is not going to be installed or
                    libavfilter-extra-2 (>= 4:0.7.3) but it is not going to be installed
           Depends: libavfilter2 (< 4:0.7.3-99) but it is not going to be installed or
                    libavfilter-extra-2 (< 4:0.7.3.99) but it is not going to be installed
           Depends: libavformat53 (< 4:0.7.3-99) but 4:0.8-1u1~ppa2 is to be installed or
                    libavformat-extra-53 (< 4:0.7.3.99) but it is not going to be installed
           Depends: libavutil51 (< 4:0.7.3-99) but it is not going to be installed or
                    libavutil-extra-51 (< 4:0.7.3.99) but 4:0.8.0.1~ppa2 is to be installed
           Depends: libpostproc52 (< 4:0.7.3-99) but 4:0.8-1u1~ppa2 is to be installed or
                    libpostproc-extra-52 (< 4:0.7.3.99) but it is not going to be installed
           Depends: libswscale2 (< 4:0.7.3-99) but 4:0.8-1u1~ppa2 is to be installed or
                    libswscale-extra-2 (< 4:0.7.3.99) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我之前的笔记本电脑上没有出现过这个问题,它运行的也是与新笔记本电脑相同的 Ubuntu 11.10 64 位。有人能帮我找到一个解决方案,而不会“弄乱和破坏”整个系统吗?提前感谢您的帮助。

答案1

我认为你已经使用过这个 ppa,可能安装了 vlc,它安装了 libavcodec-extra-53 4:0.8.0.1~ppa2 -https://launchpad.net/~n-muench/+archive/vlc

(通常当你看到类似“但是 blah-blah 需要安装”这样的错误时,这意味着 'blah-blah' 已经安装了

如果 ppa 仍然启用(值得怀疑),则运行sudo apt-get update

如果当前未启用,则重新启用或添加回来,然后运行上述命令,您将能够安装ffmpeglibav-tools提供avconv

avconv将成为运行“ffmpeg”的首选方式,因为迟早 Debian/Ubuntu 将不再提供 ffmpeg 二进制文件

如果您决定使用反向移植的 ffmpeg 共享库不是您想要的,那么在启用 ppa 后ppa-purge按建议运行。(ppa 不会提供所有依赖于共享 ffmpeg 库的软件包,因此某些应用程序或插件可能会出现问题

答案2

当我向系统添加各种 PPA 或其他 deb 存储库时,就遇到过这种情况,不需要科学家就能发现ppa错误内容中的几个实例。

我的建议是清除持有此更新版本的任何 PPA ffmpeg(其本身具有无法满足的依赖项),apt-get update然后apt-get install ffmpeg

如果你不确定哪个PPA 提供此功能,apt-cache policy ffmpeg将向您显示每个已安装源中可用的版本。

答案3

我尝试了以下链接中给出的步骤并且有效:)

http://ubuntuforums.org/showpost.php?p=5962046&postcount=9

尝试

sudo apt-get update

更新您的软件包列表。然后

sudo apt-get autoclean

清理任何不完整的包。然后

sudo apt-get clean

清理 apt 缓存。

sudo apt-get autoremove

将清除任何不需要的依赖项。

如果在执行此操作时您可以识别损坏的包装,此代码将非常有力地将其删除。

sudo dpkg --remove -force --force-remove-reinstreq <package name>

当然是将包名称更改为真实名称。

相关内容