Ubuntu 14.04,安装gstreamer1.0-libav时出现问题,依赖关系未满足


11

突然我的Ubuntu停止播放视频。当我打开视频时,播放器建议我安装 gstreamer1.0-libav。但是,它无法安装。

我尝试手动安装它,这是错误消息:

$ sudo apt-get install gstreamer1.0-libav
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:
 gstreamer1.0-libav : Depends: libavcodec54 (>= 6:9.1-1) but it is not going to be installed or
                               libavcodec-extra-54 (>= 6:9.13) but it is not going to be installed
                      Depends: libavformat54 (>= 6:9.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

天哪是对的!完全为我工作!现在我可以在Banshee上播放mp4文件了。您是如何知道的?

不知道 我不擅长linux厨房。紧随其后获得建议。我很高兴这个Linux魔术对您有所帮助:)
Sergey

Answers:


12

我的天啊。

$ sudo apt-get install libopus0
Suggested packages:
  opus-tools
The following packages will be REMOVED:
  gstreamer1.0-libav:i386 libavcodec54:i386 libavformat54:i386 libopus0:i386
The following NEW packages will be installed:
  libopus0

$ sudo apt-get install gstreamer1.0-libav
The following NEW packages will be installed:
  gstreamer1.0-libav libavcodec54 libavformat54
0 upgraded, 3 newly installed, 0 to remove and 18 not upgraded

现在可以了...不知道为什么...但是我很高兴。


您似乎已经拥有32位库的卸妆,并加载了64位库。那解决了您的问题,但不一定能为其他人回答问题。
david6,2015年

5

我认为在处理Multi-Architecture软件包管理时这是一个已知的问题。apt-get提出了首选的解决方案,以保持当前安装的相同软件包的体系结构,这在某些情况下不是您想要的。

在这种情况下,最好的解决方案是将它们:i386(libavcodec54或libavcodec-extra-54,libavformat54,..依赖关系树中的其他软件包)替换为相应的:amd64软件包。

AFAIK是最简单的解决方案,aptitude它可以提供所有其他可能的解决方案,并让您选择自己喜欢的解决方案。

在VirtualBox(Ubuntu 14.04)上进行了测试。我安装了:

sudo apt-get install gstreamer1.0-libav:i386 libavcodec54:i386 libavformat54:i386 \
libopus0:i386

尝试安装gstreamer1.0-libav会产生相同的错误消息:

# apt-get install gstreamer1.0-libav
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:
 gstreamer1.0-libav : Depends: libavcodec54 (>= 6:9.1-1) but it is not going to be installed or
                               libavcodec-extra-54 (>= 6:9.13) but it is not going to be installed
                      Depends: libavformat54 (>= 6:9.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

解决此类情况的说明:

  1. 安装能力:

    sudo apt-get install aptitude
    
  2. 运行:

    sudo aptitude
    
  3. 新闻/和搜索gstreamer1.0-libav,然后Enter

    如果不是gstreamer1.0-libav:i368,则用于n搜索。

  4. 然后按+标记以进行安装

  5. 在这种情况下,有两种解决方案,请参阅底部的红色消息。使用.,选择“ 建议删除4条建议”,这是我们正在寻找的建议。

    资质:建议4保持 才能:建议4次移除

  6. 要确认它是正确的解决方案,请按e以便对其进行检查并显示将要执行的操作。

    能力:检查解决方案

  7. 如果可以,请按“ !应用该解决方案”,然后g开始安装过程。

    (Reading database ... 58187 files and directories currently installed.)
    Removing gstreamer1.0-libav:i386 (1.2.4-1~ubuntu1) ...
    Removing libavformat54:i386 (6:9.16-0ubuntu0.14.04.1) ...
    Removing libavcodec54:i386 (6:9.16-0ubuntu0.14.04.1) ...
    Removing libavutil52:i386 (6:9.16-0ubuntu0.14.04.1) ...
    Removing libgstreamer-plugins-base1.0-0:i386 (1.2.4-1~ubuntu1) ...
    Removing libgstreamer1.0-0:i386 (1.2.4-0ubuntu1) ...
    Removing libglib2.0-0:i386 (2.40.2-0ubuntu1) ...
    Removing librtmp0:i386 (2.4+20121230.gitdf6c518-1) ...
    Removing libgnutls26:i386 (2.12.23-12ubuntu2.1) ...
    Removing libp11-kit0:i386 (0.20.2-2ubuntu2) ...
    Removing libffi6:i386 (3.1~rc1+r3.0.13-12) ...
    Removing libgcrypt11:i386 (1.5.3-2ubuntu4.1) ...
    Removing libgpg-error0:i386 (1.12-0.2ubuntu1) ...
    Removing libgsm1:i386 (1.0.13-4) ...
    Removing libmp3lame0:i386 (3.99.5+repack1-3ubuntu1) ...
    Removing libvorbisenc2:i386 (1.3.2-1.3ubuntu1) ...
    Removing libvorbis0a:i386 (1.3.2-1.3ubuntu1) ...
    Removing libtheora0:i386 (1.1.1+dfsg.1-3.2) ...
    Removing libogg0:i386 (1.3.1-1ubuntu1) ...
    Removing libopenjpeg2:i386 (1.3+dfsg-4.7ubuntu1) ...
    Removing libopus0 (1.1-0ubuntu1) ...
    Removing libschroedinger-1.0-0:i386 (1.0.11-2ubuntu1) ...
    Removing liborc-0.4-0:i386 (1:0.4.18-1ubuntu1) ...
    Removing libspeex1:i386 (1.2~rc1.1-1ubuntu1) ...
    Removing libtasn1-6:i386 (3.4-3ubuntu0.1) ...
    Removing libva1:i386 (1.3.0-2) ...
    Removing libvpx1:i386 (1.3.0-2) ...
    Removing libx264-142:i386 (2:0.142.2389+git956c8d8-2) ...
    Removing libxvidcore4:i386 (2:1.3.2-9ubuntu1) ...
    Processing triggers for libc-bin (2.19-0ubuntu6) ...
    Selecting previously unselected package libopus0.
    (Reading database ... 58038 files and directories currently installed.)
    Preparing to unpack .../libopus0_1.1-0ubuntu1_amd64.deb ...
    Unpacking libopus0 (1.1-0ubuntu1) ...
    Selecting previously unselected package libavcodec54:amd64.
    Preparing to unpack .../libavcodec54_6%3a9.16-0ubuntu0.14.04.1_amd64.deb ...
    Unpacking libavcodec54:amd64 (6:9.16-0ubuntu0.14.04.1) ...
    Selecting previously unselected package libavformat54:amd64.
    Preparing to unpack .../libavformat54_6%3a9.16-0ubuntu0.14.04.1_amd64.deb ...
    Unpacking libavformat54:amd64 (6:9.16-0ubuntu0.14.04.1) ...
    Selecting previously unselected package gstreamer1.0-libav:amd64.
    Preparing to unpack .../gstreamer1.0-libav_1.2.4-1~ubuntu1_amd64.deb ...
    Unpacking gstreamer1.0-libav:amd64 (1.2.4-1~ubuntu1) ...
    Setting up libopus0 (1.1-0ubuntu1) ...
    Setting up libavcodec54:amd64 (6:9.16-0ubuntu0.14.04.1) ...
    Setting up libavformat54:amd64 (6:9.16-0ubuntu0.14.04.1) ...
    Setting up gstreamer1.0-libav:amd64 (1.2.4-1~ubuntu1) ...
    Processing triggers for libc-bin (2.19-0ubuntu6) ...
    Press Return to continue.
    

3

我仍然收到相同的消息,但我略微更改了@Sergey的步骤并为我工作

  1. 首先手动卸载以下软件包:

    sudo apt-get remove gstreamer1.0-libav:i386
    sudo apt-get remove libavcodec54:i386
    sudo apt-get remove libavformat54:i386
    sudo apt-get remove libopus0:i386
    
  2. 现在安装:

    sudo apt-get install libopus0
    sudo apt-get install gstreamer1.0-libav
    
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.