如何在添加PPA后解决未满足的依赖关系?

偶尔,当我安装东西时,我收到如下错误:

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: package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages. 

我该如何解决这个问题?

APT是一个基于它的Debian和其他Linux发行版的软件包管理系统,比如Ubuntu。 在大多数情况下,APT易于用于安装,删除和更新软件包。 在极少数情况下,通常在混合第三方依赖项时, apt-get可能最终会给您一个错误,告诉您无法完成程序包安装。

解决方案:

备份/etc/apt/sources.list等配置文件总是一个好主意,因此您可以根据需要还原更改。

  • 如果error显示如下:

    : Depends: (= version) but this-version is to be installed

    然后确保已启用restricteduniverse存储库。 按Alt + F2 ,键入software-properties-gtk并按Enter键

    Ubuntu Software选项卡下,启用所有存储库。

  • 未满足依赖关系的一个可能原因可能是包数据库损坏,和/或某些包未正确安装。 要解决此问题,请按Alt + Ctrl + T打开终端并尝试运行以下命令之一:

      sudo apt-get clean 

    要么,

      sudo apt-get autoclean 

    apt-get clean清除检索到的包文件(.deb文件)的本地存储库。 除了来自/ var / cache / apt / archives /和/ var / cache / apt / archives / partial /的锁定文件之外,它会删除所有内容。 apt-get autoclean清除检索到的包文件的本地存储库,但与apt-get clean ,它只删除无法再下载的包文件,并且基本上没用。

  • 解决依赖性问题的最基本修复之一是运行:

      sudo apt-get -f install 

    -f在这里代表“修复破碎”。 Apt将尝试纠正破坏的依赖关系。 如果您手动安装了具有未满足依赖关系的软件包, apt-get将尽可能安装这些依赖项,否则它可能只是删除您安装的软件包以解决问题。

    然后运行:

      sudo dpkg --configure -a 

    然后再次运行:

      sudo apt-get -f install 

    如果输出是:

    0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

    这意味着它失败了。

  • 下一个解决方案是运行:

      sudo apt-get -u dist-upgrade 

    如果它显示任何保留的包,最好消除它们。 由于无法解决的依赖性冲突而保留包。 尝试使用此命令查找并修复冲突:

      sudo apt-get -o Debug :: pkgProblemResolver = yes dist-upgrade 

    如果它无法修复冲突,它将退出:

    0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.

    逐个删除保留的包,每次都运行dist-upgrade ,直到没有更多的包。 然后重新安装任何所需的包。 请务必使用--dry-run选项,以便您充分了解后果:

      sudo apt-get remove --dry-run package-name 

    由于删除您尝试安装的软件包可能不太理想,您可能还会尝试查找具有满足依赖性所需的软件包的存储库。

最后,如果所有其他方法都失败了,您可以尝试通过查找和安装必要的软件包,或者从源代码安装它们然后为它们创建“ deb ”软件包来自己满足依赖项。

禁用/删除/清除PPA:

PPA(个人包存档)是在Launchpad上托管的存储库。 您可以使用PPA来安装或升级官方Ubuntu存储库中不可用的软件包。

未满足依赖关系的最常见原因之一是PPA,特别是在用于升级Ubuntu存储库中的现有包时。 要解决此问题,您有三个选项:禁用,清除(还原到Ubuntu存储库中的原始包)或删除PPA。

  • 禁用:

    禁用PPA意味着不再对从该PPA安装的软件包进行更新。 禁用PPA:打开Software Center > Edit > Software Sources或,

    按Alt + F2并运行software-properties-gtk

    单击“ Other Software选项卡,您将看到每个PPA在这里有两行,一行用于编译的包,一行用于源, Uncheck两行以禁用PPA。 在这里,您还可以添加和删除PPA。

  • 清除:

    清除PPA意味着将所选PPA中的软件包降级到官方Ubuntu存储库中的版本并禁用该PPA。 PPA Purge正是如此。 要安装PPA清除,请运行以下命令:

      sudo apt-get install ppa-purge 

但是,考虑到问题被破坏,上述命令将失败。 所以使用此命令

 mkdir ppa-purge && cd ppa-purge && wget http://mirror.pnl.gov/ubuntu/pool/universe/p/ppa-purge/ppa-purge_0.2.8+bzr56_all.deb && wget http://mirror.pnl.gov/ubuntu//pool/main/a/aptitude/aptitude_0.6.6-1ubuntu1_i386.deb && sudo dpkg -i ./*.deb 

要使用PPA清除:

  sudo ppa-purge ppa:someppa / ppa 

如果’ppa-purge’命令由于某种原因失败,除非重新启用PPA,否则无法再次运行’ppa-purge’(要启用PPA, Check执行与禁用PPA相同的步骤并Check两行的启用它的特定PPA)。

注意: PPA Purge不会删除PPA( 可能在将来 ),因此您必须手动删除PPA。

  • 去掉:

    如果从官方Ubuntu存储库中不存在从PPA安装的软件包,则不建议使用PPA Purge ,因为没有任何内容可以降级, PPA Purge也不会删除它。 要删除PPA和已安装的软件包,请运行以下命令:(如果您不想删除已安装的软件包,请忽略第一个命令)

     sudo apt-get autoremove --purge package-name
     sudo add-apt-repository --remove ppa:someppa / ppa
     sudo apt-get autoclean
    

或者,您可以使用Y PPA Manager禁用/删除/清除PPA(答案结束时的详细信息)。

预防措施:

那么我们怎样才能避免这种情况发生呢?

  • 让Ubuntu保持最新状态。 Ubuntu会在更新可用时自动通知,您还可以通过单击Unity面板中的Session Indicator来检查可用的更新:

    或者, 按Alt + Ctrl + T打开终端并运行以下命令:

      sudo apt-get update
     sudo apt-get升级 

    更新:将可用软件包列表与源存储库中的服务器同步。 升级:下载并安装已安装软件包的任何较新版本。

  • 如果您决定将其他存储库添加到sources.list,请确保存储库适用于Ubuntu(并且已知可以正常工作)。 不适用于您的Ubuntu版本的存储库可能会在您的系统中引入不一致,并可能会强制您重新安装。 此外,请确保您确实需要添加外部存储库,因为您正在寻找的软件包可能已经被引入官方存储库! 资源
  • 删除重复的PPA。 Y PPA Manager (答案结束时的安装指南)可以轻松扫描和删除重复的PPA。

    • 按Alt + F2并运行y-ppa-manager打开Y PPA Manager。
    • 打开后,双击或按Enter键进入 Advanced
    • 在结果窗口中选择Scan and remove duplicate PPAs ,然后单击确定。

在此处输入图像描述

获得帮助:

在Askubuntu或任何其他帮助论坛上寻求帮助时,您应该在您的问题中包含以下命令的输出:

  • 输出实际错误:

      sudo apt-get install package-name 
  • 这将显示您的sources.list:

      cat /etc/apt/sources.list 
  • 这将显示PPA列表(如果有):

      cat /etc/apt/sources.list.d/* 

其他来源:

  • ‘apt’Ubuntu Manpage
  • ‘apt-get’Ubuntu Manpage
  • ‘apt-get / how-to’社区Ubuntu文档
  • ‘Repositories / Ubuntu’社区Ubuntu文档
  • ‘Repositories / CommandLine’社区Ubuntu文档

Y PPA经理 : Y PPA经理是一站式服务,满足您的所有PPA需求。

是经理

以下是它的一些function:

  • 在所有Launchpad PPA中搜索包
  • 列出并下载PPA中的包
  • 添加/删除/清除PPA
  • 备份和恢复PPA源
  • 删除重复的PPA来源

要安装Y PPA Manager ,请按Alt + Ctrl + T打开终端并运行以下命令:

 sudo add-apt-repository ppa:webupd8team / y-ppa-manager
 sudo apt-get update
 sudo apt-get install y-ppa-manager

考虑到这个问题, apt被破坏了,所以请改用这些命令

 sudo su 

32位:

 mkdir y-ppa-manager && cd y-ppa-manager && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/launchpad-getkeys_0.3.2-1~webupd8~oneiric_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/y-ppa-manager_0.0.8.6-1~webupd8~precise_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/yad_0.17.1.1-1~webupd8~precise_i386.deb && dpkg -i ./*.deb 

64位:

 mkdir y-ppa-manager && cd y-ppa-manager && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/launchpad-getkeys_0.3.2-1~webupd8~oneiric_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/y-ppa-manager_0.0.8.6-1~webupd8~precise_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/yad_0.17.1.1-1~webupd8~precise_amd64.deb && dpkg -i ./*.deb 

注意:要求运行的所有命令必须在终端中运行,可以通过Ctrl + Alt + T或在短划线中搜索终端来打开。

真的坏了吗?

尝试运行以下命令并尝试重新安装您尝试安装的软件

 sudo apt-get update 

前表演步骤

备份

备份以下文件:

  • /etc/apt/sources.list
  • /var/lib/dpkg/status

为此,请使用这些命令

 sudo cp /etc/apt/sources.list /etc/apt/sources.list.original 

 sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.original 

清除apt-cache

apt保留最近下载的包的缓存,以便在需要安装时节省带宽。 在某些情况下,这可能适得其反

现在,为了清理它,你有两个选择

 sudo apt-get clean 

这将删除属于文件夹/var/cache/apt/archives//var/cache/apt/archives/partial所有缓存包,但.lock文件除外。 这是推荐的

 sudo apt-get autoclean 

这将扫描文件夹/var/cache/apt/archives//var/cache/apt/archives/partial并检查包是否仍在存储库中并删除不存在的包


修复依赖项

使用apt的修复破坏模式

 sudo apt-get -f install 

这将导致apt扫描缺少的依赖项并从存储库中修复它们

如果输出声明未安装或升级任何新内容,则表示失败。


检查是否已启用所有必需的源

输入gksu software-properties-gtk ,你就会看到这个窗口

确保已启用所有来源。

接下来,转到“其他软件”选项卡,检查是否已安装要安装的软件所需的PPA。 另外,尝试禁用某些可能已破坏软件包的PPA

现在,运行sudo apt-get update

立即尝试安装该软件

选择要从中下载的更好服务器

输入gksu software-properties-gtk ,你就会看到这个窗口

单击下拉框中的“下载”,然后选择其他

单击选择最佳服务器

运行sudo apt-get update

尝试安装该软件

另外,尝试使用sudo apt-get install -f


PPA清洗

这是一个用于清除破碎/不需要的ppa及其应用程序的工具

要安装它,请运行

 sudo apt-get install ppa-purge 

但是,考虑到问题被打破,所以上述命令将失败。 所以使用此命令

 mkdir ppa-purge && cd ppa-purge && wget http://mirror.pnl.gov/ubuntu/pool/universe/p/ppa-purge/ppa-purge_0.2.8+bzr56_all.deb && wget http://mirror.pnl.gov/ubuntu//pool/main/a/aptitude/aptitude_0.6.6-1ubuntu1_i386.deb && sudo dpkg -i ./*.deb 

现在使用ppa purge

 sudo ppa-purge ppa:someppa/ppa 

Y-PPA经理

Y-PPA Manager是一个gui应用程序,可以帮助您管理PPA以及与之相关的各种问题

安装它

 sudo add-apt-repository ppa:webupd8team/y-ppa-manager 

 sudo apt-get update 

 sudo apt-get install y-ppa-manager 

考虑到这个问题, apt被破坏了,请改用这些命令

 sudo su 

32位:

 mkdir y-ppa-manager && cd y-ppa-manager && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/launchpad-getkeys_0.3.2-1~webupd8~oneiric_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/y-ppa-manager_0.0.8.6-1~webupd8~precise_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/yad_0.17.1.1-1~webupd8~precise_i386.deb && dpkg -i ./*.deb 

64位:

 mkdir y-ppa-manager && cd y-ppa-manager && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/launchpad-getkeys_0.3.2-1~webupd8~oneiric_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/y-ppa-manager_0.0.8.6-1~webupd8~precise_all.deb && wget https://launchpad.net/~webupd8team/+archive/y-ppa-manager/+files/yad_0.17.1.1-1~webupd8~precise_amd64.deb && dpkg -i ./*.deb 

现在输入y-ppa-manager

您将看到此窗口

双击高级,您将看到此窗口

执行以下任务以黑色标出


预防胜于治疗

最好是防止在AskUbuntu上搜索这个问题:D

因此,以下是保护您安全的指南

让您的系统保持最新状态

始终定期运行以下命令

 sudo apt-get update&&sudo apt-get upgrade 

或者,您始终可以使用此命令使用Update Manager

 gksu update-manager 

仅使用可信任的PPA

仅使用PPA也意味着在Ubuntu上使用,仅使用PPA和可靠来源。 事实上,包可能已经在ubuntu存储库中

当事情好的时候备份并在以后恢复它

为此你需要Y-PPA-Manager。 上面给出了安装它的步骤。

运行此命令以打开Y-PPA-Manager

 y-ppa-manager 

您将看到此窗口

双击高级,您将看到此窗口

运行这个:

系统会要求您保存tar.gz文件,其对话框类似于下面的对话框。 将其保存在另一个分区或安全的地方

稍后,当您需要再次恢复它时,请按照类似的步骤操作,当您进入高级对话框时,单击此按钮:

系统会要求您使用类似下面的对话框从先前保存的备份中恢复


全部在一个脚本中

快来了


还是行不通?

包依赖性错误并不总是通用的,取决于要安装的包。

如果按照给出的所有修复错误的步骤对您不起作用,您可以随时询问Ask Ubuntu

以下是您需要发布输出的一些命令

 sudo apt-get install packagename 

 cat /etc/apt/sources.list 

 cat /etc/apt/sources.list.d/* 

(感谢Basharat Sial )

还有其他文件/命令需要输出,可能是特定于错误的,用户可能会在注释中提示您发布文件/命令。

到目前为止,这些答案都集中在如何自动解决这样的问题上,主要是希望它能够自行解决,而不是专注于理解如何调查依赖关系。 尝试确保您的软件包列表是最新的非常重要,因为在深入挖掘之前,您需要确保简单更新或清除缓存无法解决问题。 但是,如果幕后的一切都正常工作,那么学习如何理解依赖关系至关重要。 有时,依赖层似乎过于庞大,但概念很简单,也是了解如何在Ubuntu系统中安装/卸载软件的关键。

我强烈建议任何人使用像Ubuntu这样的基于.deb的系统。 它的树结构允许您轻松浏览依赖项,包括推荐和建议的包,以及可视化冲突和未满足的依赖项。 当apt-get不提供简单的解决方案以及一般地可视化依赖关系时,它是一个非常宝贵的工具。 ( Synaptic也可以在Ubuntu中使用,但我觉得它不直观。)

Aptitude还提供冲突解决程序,它将引导您完成已安装/已删除/已升级/已升级软件包的所有可能组合,以满足所有要求,而不会产生冲突或问题。 即使apt无法找到解决方案,这也可以成功。 作为Ubuntu用户,通常不会出现需要您调查特定软件包安装原因的情况,但在您更多地使用系统时几乎不可避免。

package1:取决于:package2(> = 1.8),但是要安装1.7.5-1ubuntu1

消息说明:

  1. 为了完成安装,package1需要package2。
  2. package2必须在版本> = 1.8中可用
  3. 软件包管理器检查了所有存储库,只找到了可以安装的版本1.7.5-1ubuntu1,由于它是<1.8,它不会这样做

固定

这个问题没有单一的正确答案,没有简单的答案。

有许多情况可能会发生这种情况,并且必须调查所有选项并尝试解决导致此错误的前提条件。

情景A:

您有权访问的所有存储库在版本> = 1.8中没有package2,因此您必须找到一个存储库。 如果您无法找到版本> = 1.8的存储库,那么您可能必须从源代码构建和安装package2。 然后尝试安装package1。

如果您想知道如何从源代码构建包,请检查其他问题/答案或发布新的问题。

情景B:

存储库包含版本> = 1.8的package2,但包管理器仍然想要安装旧版本(1.7.5)。

原因可能是package2的更高版本由一些较新的技术构建,而这些新技术已经安装的其他软件包不支持。

这根本不可能解决。 您可以尝试使用apt或synaptic并查找存储库中可用的package2的所有版本,并尝试安装特定版本> = 1.8

如果您有其他不兼容的软件包并且执行此操作,您将获得阻止安装package2> = 1.8的所有其他软件包的类似错误消息的列表。

在这种情况下,你有一个更大的问题。 你想安装package1,它需要package2> = 1.8,但是版本> = 1.8的package2要求package3的版本> = 6.7你有package3版本6.3

问题是包管理器(APT)尝试在可能的情况下自动解决所有这些依赖关系。 如果它说不可能(并发出问题中的消息),那么你应该相信它。

如果您决定不信任软件包管理器,并且您确定不会遇到问题,那么您可以尝试逐个强制安装所有软件包的特定所需版本,并希望可以。

请注意,对系统包执行此操作可能会产生严重问题。 您可以将自己锁定在系统之外,阻止关键服务等。

场景C:

无论出现问题的原因,您都可以随时设置手动编译,并从源代码中构建所需的软件包及其所需的所有依赖项。 使用此选项,您可以将构建的内容保存在单独的目录中,并保留在系统路径之外,这样就不会与系统产生冲突。 这可能是最干净的解决方案,有时可以更快。

情景D:

软件包管理器可以访问有关软件包的过时信息,因此无法找到解决方案。 看看其他答案。

情景E:

程序包管理器在依赖项解析代码中存在错误。

您必须调查确实如此,然后发出错误请求。

场景Z:

可能还有其他情况。

例如,软件包维护者可能是错误的,并且没有检查package1是否可以使用package2 <1.8的版本,并且在规范中他们设置了错误的依赖项。

每当您收到关于Unmet Dependencies的错误时,都需要遵循这些方法

按照说明操作后,尝试安装软件。 至少其中一种方法应该适合你

1 。 在尝试任何新命令或添加任何新的ppa之前试试这个

清理apt缓存:

 sudo apt-get clean 

清理任何未使用的依赖项:

 sudo apt-get autoremove 

更新apt-cache

 sudo apt-get update 

这将删除所有缓存并将下载新缓存。 这应该是为了获得新的缓存包和更新的更新。

2 。 试试sudo apt-get install -f

它可能会提供一些关于删除和安装包的建议,做一些看似合理的事情。

3 。 从Software Sources更改Download Server因为有时服务器上的文件已损坏。

在此处输入图像描述
在此处输入图像描述
在此处输入图像描述

4 。 如果您之前为破坏的依赖项添加了外部ppa,也会发生这种情况。请尝试删除该ppa

  • 键入sudo add-apt-repository --remove ppa:someppa/ppa然后手动删除ppa安装的文件/库

要么

  • 清除ppa(这也会删除已安装的文件)

     sudo apt-get install ppa-purge #a one time install sudo ppa-purge ppa:someppa/ppa 

5 。 如果没有4不是你的情况,那么至少尝试删除显示为破坏依赖关系的包。然后再次尝试安装。据报道这已经为很多人提供了帮助。

6 。 始终添加稳定版本的存储库/ PPA。

在此处输入图像描述

7还要确保已启用所有官方存储库(在Software Sources

在此处输入图像描述

请不要启用Proposed Updates因为它们适用于测试/开发人员。

在此处输入图像描述


正如道格所说:

通常,解决此问题的最佳第一步是确定

另外没有注意到,在许多情况下,如果不是大多数情况,“将要安装”实际上意味着“已安装”,并且如果没有其他工作可以尝试删除(如第5点)。


我将继续添加更多的东西找不到修复unmet dependencies

在大多数情况下,通过aptitude安装软件包将解决未满足的依赖关系。你的pc上没有安装默认的aptitude软件包。首先通过运行安装它,

 sudo apt-get update sudo apt-get install aptitude 

然后,

 sudo aptitude install packagename 

例如,

    
 avinash @ avinash-Lenovo-IdeaPad-Z500:〜$ sudo apt-get install ubuntu-sdk
阅读包裹清单......完成
构建依赖树       
阅读国家信息......完成
某些软件包无法安装。 这可能意味着你有
请求一个不可能的情况或如果您使用不稳定
尚未创建某些必需包的分发
或被移出Incoming。
以下信息可能有助于解决此问题:

以下包具有未满足的依赖项:
  ubuntu-sdk:取决于:qtcreator-plugin-ubuntu但它不会被安装
 E:无法纠正问题,你已经破了包裹。

通过aptitude安装包

 avinash @ avinash-Lenovo-IdeaPad-Z500:〜$ sudo aptitude安装ubuntu-sdk
将安装以下新软件包:
   apparmor-easyprof {a} apparmor-easyprof-ubuntu {a}位于{a} build-essential {a} 
  点击{a} click-apparmor {a} click-dev {a} click-doc {a} cordova-ubuntu-2.8 
   cordova-ubuntu-2.8-examples {a} debhelper {a} devscripts {a} dh-apparmor {a} 
   dh-make {a} distro-info-data {a} dpkg-dev {a} dput {a} g ++ {a} g ++  -  4.8 {a} 
   geoclue-gypsy {a} libalgorithm-diff-perl {a} libalgorithm-diff-xs-perl {a} 
   libalgorithm-merge-perl {a} libboost-filesystem1.53.0 {a} 
   libboost-program-options1.53.0 {a} libboost-regex1.53.0 {a} 
   libbotan-1.10-0 {a} libdee-qt5-3 {a} libdistro-info-perl {a} 
   libexporter-lite-perl {a} libglib2.0-dev {a} 
   libgstreamer-plugins-base1.0-dev {a} libgstreamer1.0-dev {a} libgypsy0 {a} 
   libhud2 {a} libio-stringy-perl {a} libjs-jquery {a} libjs-sphinxdoc {a} 
   libjs-underscore {a} liblockdev1 {a} libmail-sendmail-perl {a} 
   libparse-debcontrol-perl {a} libpcre3-dev {a} libpcrecpp0 {a} 
   libpoppler-qt5-1 {a} libqdjango-db0 {a} libqgsttools-p1 {a} 
   libqt5clucene5 {a} libqt5contacts5 {a} libqt5declarative5 {a} 
   libqt5designer5 {a} libqt5designercomponents5 {a} libqt5feedback5 {a} 
   libqt5help5 {a} libqt5location5-plugins {a} libqt5multimedia5 {a} 
   libqt5multimedia5-plugins libqt5multimediaquick-p5 {a} 
   libqt5multimediawidgets5 {a} libqt5organizer5 {a} 
   libqt5qml-graphicaleffects {a} libqt5script5 libqt5scripttools5 {a} 
   libqt5svg5 {a} libqt5svg5-dev libqt5systeminfo5 {a} libqt5v8-5-dev 
   libqt5versit5 {a} libqt5versitorganizer5 {a} libqt5webkit5-dev 
   libqt5webkit5-qmlwebkitplugin {a} libqt5xmlpatterns5 {a} 
   libqt5xmlpatterns5-dev libstdc ++  -  4.8-dev {a} libsys-hostname-long-perl {a} 
   libthumbnailer0 {a} libu1db-qt5-3 {a} libunity-action-qt1 {a} 
   libupstart-app-launch1 {a} libusermetricsinput1 {a} libxml2-dev {a} 
   libxslt1-dev {a} po-debconf {a} python3-apparmor-click {a} python3-click {a} 
   python3-magic {a} qmlscene qt3d5-dev qtbase5-doc {a} qtcreator {a} 
   qtcreator-doc {a} qtcreator-plugin-ubuntu {a} 
   qtcreator-plugin-ubuntu-common {a} qtdeclarative5-accounts-plugin 
   qtdeclarative5-cordova-2.8-plugin {a} qtdeclarative5-dev-tools 
   qtdeclarative5-doc-html {a} qtdeclarative5-folderlistmodel-plugin 
   qtdeclarative5-friends0.2 qtdeclarative5-localstorage-plugin 
   qtdeclarative5-particles-plugin qtdeclarative5-poppler1.0 
   qtdeclarative5-qtaudioengine-plugin qtdeclarative5-qtfeedback-plugin {a} 
   qtdeclarative5-qtlocation-plugin qtdeclarative5-qtmultimedia-plugin {a} 
   qtdeclarative5-qtorganizer-plugin qtdeclarative5-qtquick2-plugin {a} 
   qtdeclarative5-qtsensors-plugin qtdeclarative5-u1db1.0 
   qtdeclarative5-Ubuntu的用户界面,额外的浏览器,插件{A} 
   qtdeclarative5-Ubuntu的用户界面,额外的浏览器,插件资产{A} 
   qtdeclarative5-Ubuntu的UI的工具包,插件{A} 
   qtdeclarative5-unity-action-plugin {a} qtdeclarative5-usermetrics0.1 
   qtdeclarative5-window-plugin {a} qtdeclarative5-xmllistmodel-plugin 
   qtgraphicaleffects5-doc {a} qtlocation5-dev {a} qtmultimedia5-dev 
   qtmultimedia5-doc {a} qtmultimedia5-doc-html {a} qtscript5-dev 
   qtscript5-doc {a} qtscript5-doc-html {a} qtsensors5-dev {a} qtsvg5-doc {a} 
   qtsvg5-doc-html {a} qttools5-dev qttools5-dev-tools qttools5-doc {a} 
   qtwebkit5-doc-html {a} schroot {a} schroot-common {a} sqlite3 {a} 
   ubuntu-html5-container ubuntu-html5-sdk {ab} ubuntu-html5-theme {a} 
   ubuntu-html5-theme-examples ubuntu-sdk ubuntu-sdk-libs 
   ubuntu-sdk-libs-dev {a} ubuntu-ui-toolkit-doc {a} 
   ubuntu-ui-toolkit-examples {a} ubuntu-ui-toolkit-theme {a} 
   unity-action-doc {a} upstart-app-launch {a} upstart-app-launch-tools {a} 
   usermetricsservice {a} wdiff {a} zlib1g-dev {a} 
将升级以下包:
   cpp-4.8 gcc-4.8 gcc-4.8-base hud libasan0 libatomic1 libgcc-4.8-dev 
   libgcc1 libglib2.0-0 libglib2.0-bin libgomp1 libitm1 libquadmath0 
   libstdc ++ 6 libtsan0 
升级了15个包,新安装了151个,删除了0个,未升级了293个。
需要获得108 MB / 126 MB的档案。 打开包装后将使用273 MB。
以下包具有未满足的依赖项:
  ubuntu-html5-sdk:取决于:qtdeclarative5-ubuntu-webapps-api这是一个虚拟包。
                    取决于:ubuntu-html5-ui-toolkit但它不会被安装。
以下操作将解决这些依赖关系:

     将以下包保留在当前版本中:              
 1)qtcreator-plugin-ubuntu [未安装]                          
 2)ubuntu-html5-sdk [未安装]                                 
3) ubuntu-sdk [Not Installed]                                       

     Leave the following dependencies unresolved:                       
4) libhud-client2 recommends hud (= 13.10.1+13.10.20131014-0ubuntu1)
5) qtcreator-plugin-ubuntu-common recommends qtcreator-plugin-ubuntu


Accept this solution? [Y/n/q/?] y
The following NEW packages will be installed:
  apparmor-easyprof{a} apparmor-easyprof-ubuntu{a} build-essential{a} 
  click{a} click-apparmor{a} cordova-ubuntu-2.8 debhelper{a} dh-apparmor{a} 
  dh-make{a} dpkg-dev{a} g++{a} g++-4.8{a} geoclue-gypsy{a} 
  libalgorithm-diff-perl{a} libalgorithm-diff-xs-perl{a} 
  libalgorithm-merge-perl{a} libdee-qt5-3{a} libglib2.0-dev{a} 
  libgstreamer-plugins-base1.0-dev{a} libgstreamer1.0-dev{a} libgypsy0{a} 
  libhud2{a} libjs-jquery{a} libmail-sendmail-perl{a} libpcre3-dev{a} 
  libpcrecpp0{a} libpoppler-qt5-1{a} libqdjango-db0{a} libqgsttools-p1{a} 
  libqt5clucene5{a} libqt5contacts5{a} libqt5designer5{a} 
  libqt5designercomponents5{a} libqt5feedback5{a} libqt5help5{a} 
  libqt5location5-plugins{a} libqt5multimedia5{a} libqt5multimedia5-plugins 
  libqt5multimediaquick-p5{a} libqt5multimediawidgets5{a} 
  libqt5organizer5{a} libqt5qml-graphicaleffects{a} libqt5script5 
  libqt5scripttools5{a} libqt5svg5{a} libqt5svg5-dev libqt5systeminfo5{a} 
  libqt5v8-5-dev libqt5versit5{a} libqt5versitorganizer5{a} 
  libqt5webkit5-dev libqt5webkit5-qmlwebkitplugin{a} libqt5xmlpatterns5{a} 
  libqt5xmlpatterns5-dev libstdc++-4.8-dev{a} libsys-hostname-long-perl{a} 
  libthumbnailer0{a} libu1db-qt5-3{a} libunity-action-qt1{a} 
  libupstart-app-launch1{a} libusermetricsinput1{a} libxml2-dev{a} 
  libxslt1-dev{a} po-debconf{a} python3-apparmor-click{a} python3-click{a} 
  qmlscene qt3d5-dev qtdeclarative5-accounts-plugin 
  qtdeclarative5-cordova-2.8-plugin{a} qtdeclarative5-dev-tools 
  qtdeclarative5-folderlistmodel-plugin qtdeclarative5-friends0.2 
  qtdeclarative5-localstorage-plugin qtdeclarative5-particles-plugin 
  qtdeclarative5-poppler1.0 qtdeclarative5-qtaudioengine-plugin 
  qtdeclarative5-qtfeedback-plugin{a} qtdeclarative5-qtlocation-plugin 
  qtdeclarative5-qtmultimedia-plugin{a} qtdeclarative5-qtorganizer-plugin 
  qtdeclarative5-qtquick2-plugin{a} qtdeclarative5-qtsensors-plugin 
  qtdeclarative5-u1db1.0 qtdeclarative5-ubuntu-ui-extras-browser-plugin{a} 
  qtdeclarative5-ubuntu-ui-extras-browser-plugin-assets{a} 
  qtdeclarative5-ubuntu-ui-toolkit-plugin{a} 
  qtdeclarative5-unity-action-plugin{a} qtdeclarative5-usermetrics0.1 
  qtdeclarative5-window-plugin{a} qtdeclarative5-xmllistmodel-plugin 
  qtlocation5-dev{a} qtmultimedia5-dev qtscript5-dev qtsensors5-dev{a} 
  qttools5-dev qttools5-dev-tools sqlite3{a} ubuntu-html5-container 
  ubuntu-html5-theme{a} ubuntu-html5-theme-examples ubuntu-sdk-libs 
  ubuntu-ui-toolkit-theme{a} upstart-app-launch{a} 
  upstart-app-launch-tools{a} usermetricsservice{a} wdiff{a} zlib1g-dev{a} 
The following packages will be upgraded:
  cpp-4.8 gcc-4.8 gcc-4.8-base hud libasan0 libatomic1 libgcc-4.8-dev 
  libgcc1 libglib2.0-0 libglib2.0-bin libgomp1 libitm1 libquadmath0 
  libstdc++6 libtsan0 
15 packages upgraded, 108 newly installed, 0 to remove and 293 not upgraded.
Need to get 27.1 MB/45.8 MB of archives. After unpacking 104 MB will be used.
Do you want to continue? [Y/n/?] 

My answer is similar to rick’s above.

Using apt-get clean , apt-get autoclean , apt-get autoremove , apt-get upgrade , apt-get update , apt-get -u dist-upgrade , etc. all didn’t work for me.

I finally resolved this issue by descending into the dependency tree via apt-get install , illustrated with an example below. In my case, I wanted to install libmagickwand-dev :

 apt-get install libmagickwand-dev 

我收到了这个错误:

 The following packages have unmet dependencies: libmagickwand-dev : Depends: libmagickcore4-extra (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed Depends: libmagickcore-dev (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed 

So, I ran apt-get install for one of the failing dependencies:

 apt-get install libmagickcore-dev The following packages have unmet dependencies: libmagickcore-dev : Depends: libmagickcore4-extra (= 8:6.6.9.7-5ubuntu3.2) but it is not going to be installed Depends: libgraphviz-dev but it is not going to be installed 

I descended further down the tree:

 apt-get install libgraphviz-dev 

with another error:

 The following packages have unmet dependencies: libgraphviz-dev : Depends: libgvc5 (= 2.26.3-10ubuntu1) but it is not going to be installed 

Once more deeper down the tree:

 apt-get install libgvc5 

Fore some strange reason, this succeeded, and I was able to install the original package I wanted with apt-get install libmagickwand-dev :

 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: libcdt4 libgd2-xpm libgraph4 libpathplan4 Suggested packages: libgd-tools The following NEW packages will be installed: libcdt4 libgd2-xpm libgraph4 libgvc5 libpathplan4 0 upgraded, 5 newly installed, 0 to remove and 2 not upgraded. Need to get 808 kB of archives. After this operation, 2,320 kB of additional disk space will be used. Do you want to continue [Y/n]? 

Excellent answers! But today my case seems different from yours. 这是我的建议。

Problem:

I failed to install apache2 in ubuntu 10.10.

 rick@wen-VirtualBox:~$ sudo apt-get install apache2 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: apache2 : Depends: apache2-mpm-worker (= 2.2.16-1ubuntu3) but it is not going to be installed or apache2-mpm-prefork (= 2.2.16-1ubuntu3) but it is not going to be installed or apache2-mpm-event (= 2.2.16-1ubuntu3) but it is not going to be installed or apache2-mpm-itk (= 2.2.16-1ubuntu3) but it is not going to be installed Depends: apache2.2-common (= 2.2.16-1ubuntu3) but it is not going to be installed E: Broken packages 

Solution:

My way is add the depended package into install list.

If ‘sudo apt-get install apache2’ failed, try ‘ sudo apt-get install apache2 apache2.2-common ‘.

See? apache2.2-common comes from error log of previous step.

At last I found there’s a dependency chain like this:

  apache2.2-common <-- apache2.2-bin <-- libaprutil1-ldap <-- libaprutil1 

For the first 3 packages, apt-get log told me ' is not going to be installed',

but for the last package, it shows 'libaprutil1-ldap : Depends: libaprutil1 (= 1.3.9+dfsg-3build1) but 1.3.9+dfsg-3ubuntu0.10.10.1 is to be installed'

I have a different version existing in my lib, so:

 sudo apt-get remove libaprutil1 sudo apt-get install apache2 

Now it's ok.

what is unmet dependencies Error

On Ubuntu packages are the primary way that software is built, deployed, and installed. Very simply, packages are an alternative to downloading, building, and installing software from scratch. They offer a host of advantages in terms of installation, removal, monitoring, and handling interactions between pieces of software over the standard “build from source” model. Ubuntu uses centralized packaging system ,Ie Every package is depends to some other packages .When we installs a package it’s dependencies will be installed ,The unmet dependencies error occurs when the the dependencies of the package is not available for installation

可能的原因

 1.Computer is not connected to the Internet 2.The repository containing the depandancy package is not enabled 3.Package catalog is not updated 4.The version of the depandancy in the current repository is old 5.Software index is broken 6.The depandancy is not available for ubuntu 

Let’s TRy to solve it

  1. Connect to the internet 😀
  2. Make sure that all the default repositories are enabled

    ->You can easily add them in the Software Center ->Edit->Software Sources->Other Sources->Add”

    -> Start the Software Center .

    ->. In the panel go to Edit and select Software Sources .

    edit-software-sources

    ->Make sure all the repositories are checked 在此处输入图像描述

  3. Update the software catalog

    click on the top right icon and chose update-available Entry in the menu
    在此处输入图像描述

and press check button 在此处输入图像描述

4.type ctrl + alt + t to open terminal and type sudo apt-get install -f

5.Purge the recently added ppa using ppa-purge ppa-purge Install ppa-purge

This program disables a PPA from your Software Sources and reverts your system back to the official Ubuntu packages. You can use this to return your system to normal after testing a new version from a PPA.

Syntax

 sudo ppa-purge ppa:/ 

 sudo ppa-purge ppa:ubuntu-mozilla-daily/ppa 
  1. open software center ,and try to install any software , If the following dialog box appeared ,press on the repair button ,and wait

在此处输入图像描述

Else type ctrl + alt + t to open terminal and type sudo apt-get install -f and follow the onscreen instructions

If still error occurs, Feel free to to ask it in askbuntu

…dont forget about `build-dep`

In addition to those answers above — I have to admit I am surprised that nobody have mentioned this approach which, is what I have always used as a “silver bullet” at any time I encountered apt-get conflicts or unresolved packages (or even if the system is being stubborn….ha!).

EDITED: using sudo dpkg -r [package] is encouraged as it has pretty powerful removal function. Since apt-get works alongside with dpkg , which means apt-get will obey dpkg function.

  sudo dpkg -r [package] sudo apt-get build-dep [package] ## pre-install all deps for the package 

You call apt-get to purge the failed package you were trying to install in the system, and then you call build-dep command, which apt-get will grab and install dependencies individually belonging to this package, so that way they’ll satisfy the package prior. Then finally, call the apt-get install:

 sudo apt-get install [package] 

….’Ugh! Let’s twist your arm until you yell “Uncle!”‘

This rarely happened during my long years of linux use, but I found myself using this approach seldomly and succeeded. This is an example for the recent struggle I had earlier a month ago with packages mysql-client/mysql-server . After a dozen failed attempts to reset my root password with mysql-server (even via –skip-grant-tables techqiue but yet failed), I finally succeed in ‘twisting Linux’s arm until it yelled “Uncle!”‘:

 sudo dpkg -r mysql-server mysql-client sudo apt-get autoclean ## this dumps any copy of existing package to prevent apt-get from "re-using" it. sudo apt-get build-dep mysql-client ## one package at a time, starting with client first sudo apt-get install mysql-client sudo apt-get build-dep mysql-server sudo apt-get install mysql-server 

apt-get autoclean is the key in this solution

During the installation of i386 packages in 64 bit Multiarch Ubuntu systems

If you’re trying to install a package which depends on many i386 packages, the above stated dependency error also would be caused if you fail to add i386 architecture by running sudo dpkg --add-architecure i386 command.

例:

 avinash@avinash-Lenovo-IdeaPad-Z500:~$ sudo apt-get install skype 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: skype : Depends: skype-bin but it is not installable E: Unable to correct problems, you have held broken packages. avinash@avinash-Lenovo-IdeaPad-Z500:~$ sudo dpkg --add-architecture i386 avinash@avinash-Lenovo-IdeaPad-Z500:~$ sudo apt-get install skype Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: gcc-4.8-base:i386 gcc-4.9-base:i386 libasound2:i386 libasound2-plugins:i386 libasyncns0:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libc6:i386 libcgmanager0:i386 libcomerr2:i386 libcups2:i386 libdbus-1-3:i386 libdbusmenu-qt2:i386 libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libelf1:i386 libexpat1:i386 libffi6:i386 libflac8:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgcrypt11:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libgstreamer-plugins-base1.0-0:i386 libgstreamer1.0-0:i386 libice6:i386 libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjson-c2:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 libllvm3.4:i386 liblzma5:i386 libmysqlclient18:i386 libnih-dbus1:i386 libnih1:i386 libogg0:i386 liborc-0.4-0:i386 libp11-kit0:i386 libpciaccess0:i386 libpcre3:i386 libpng12-0:i386 libpulse0:i386 libqt4-dbus:i386 libqt4-declarative:i386 libqt4-network:i386 libqt4-opengl:i386 libqt4-script:i386 libqt4-sql:i386 libqt4-sql-mysql:i386 libqt4-xml:i386 libqt4-xmlpatterns:i386 libqtcore4:i386 libqtdbus4:i386 libqtgui4:i386 libqtwebkit4:i386 libsamplerate0:i386 libselinux1:i386 libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsqlite3-0:i386 libssl1.0.0:i386 libstdc++6:i386 libtasn1-6:i386 libtiff5:i386 libtinfo5:i386 libtxc-dxtn-s2tc0:i386 libudev1:i386 libuuid1:i386 libvorbis0a:i386 libvorbisenc2:i386 libwrap0:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386 libxml2:i386 libxrender1:i386 libxshmfence1:i386 libxslt1.1:i386 libxss1:i386 libxt6:i386 libxv1:i386 libxxf86vm1:i386 mysql-common skype-bin:i386 sni-qt:i386 zlib1g:i386 Suggested packages: nas:i386 glibc-doc:i386 locales:i386 rng-tools:i386 libglide3:i386 gnutls-bin:i386 krb5-doc:i386 krb5-user:i386 libvisual-0.4-plugins:i386 gstreamer-codec-install:i386 gnome-codec-install:i386 gstreamer1.0-tools:i386 gstreamer1.0-plugins-base:i386 jackd2:i386 pulseaudio:i386 libqt4-declarative-folderlistmodel:i386 libqt4-declarative-gestures:i386 libqt4-declarative-particles:i386 libqt4-declarative-shaders:i386 qt4-qmlviewer:i386 libqt4-dev:i386 libicu48:i386 libthai0:i386 qt4-qtconfig:i386 Recommended packages: xml-core:i386 The following NEW packages will be installed: gcc-4.8-base:i386 gcc-4.9-base:i386 libasound2:i386 libasound2-plugins:i386 libasyncns0:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libc6:i386 libcgmanager0:i386 libcomerr2:i386 libcups2:i386 libdbus-1-3:i386 libdbusmenu-qt2:i386 libdrm-intel1:i386 libdrm-nouveau2:i386 libdrm-radeon1:i386 libdrm2:i386 libelf1:i386 libexpat1:i386 libffi6:i386 libflac8:i386 libfontconfig1:i386 libfreetype6:i386 libgcc1:i386 libgcrypt11:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgssapi-krb5-2:i386 libgstreamer-plugins-base1.0-0:i386 libgstreamer1.0-0:i386 libice6:i386 libjack-jackd2-0:i386 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjson-c2:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 libllvm3.4:i386 liblzma5:i386 libmysqlclient18:i386 libnih-dbus1:i386 libnih1:i386 libogg0:i386 liborc-0.4-0:i386 libp11-kit0:i386 libpciaccess0:i386 libpcre3:i386 libpng12-0:i386 libpulse0:i386 libqt4-dbus:i386 libqt4-declarative:i386 libqt4-network:i386 libqt4-opengl:i386 libqt4-script:i386 libqt4-sql:i386 libqt4-sql-mysql:i386 libqt4-xml:i386 libqt4-xmlpatterns:i386 libqtcore4:i386 libqtdbus4:i386 libqtgui4:i386 libqtwebkit4:i386 libsamplerate0:i386 libselinux1:i386 libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsqlite3-0:i386 libssl1.0.0:i386 libstdc++6:i386 libtasn1-6:i386 libtiff5:i386 libtinfo5:i386 libtxc-dxtn-s2tc0:i386 libudev1:i386 libuuid1:i386 libvorbis0a:i386 libvorbisenc2:i386 libwrap0:i386 libx11-6:i386 libx11-xcb1:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386 libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386 libxi6:i386 libxml2:i386 libxrender1:i386 libxshmfence1:i386 libxslt1.1:i386 libxss1:i386 libxt6:i386 libxv1:i386 libxxf86vm1:i386 mysql-common skype skype-bin:i386 sni-qt:i386 zlib1g:i386 0 upgraded, 115 newly installed, 0 to remove and 7 not upgraded. Need to get 63.7 MB of archives. After this operation, 225 MB of additional disk space will be used. Do you want to continue? [Y/n] 

After having tried close to every method mentioned in this thread (and others) I was close to giving up. I’d upgraded my Debian Lenny to Squeeze, and I couldn’t for the life of me figure out why PHP5, Apache, MySQL etc. didn’t want to install. In the end I tried to use

 sudo apt-get purge apache2 sudo apt-get purge php5 sudo apt-get purge mysql-server sudo apt-get clean sudo apt-get autoremove sudo apt-get install apache2 php5 mysql-server 

..and it worked flawlessly! ( Beware, it might destroy your config files, so back them up! )

What worked for me is to re-install the dependency. It is the case where the installed version is more recent than the latest (what synaptic shows). It is actually equivalent to allow synaptic to downgrade the dependency package.

Another thing that worked is using “aptitude”:

 root@arau:~# aptitude install libgfortran3 The following NEW packages will be installed: libgfortran3{b} 0 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 250 kB of archives. After unpacking 1 230 kB will be used. The following packages have unmet dependencies: libgfortran3 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is installed. Internal error: found 2 (choice -> promotion) mappings for a single choice. The following actions will resolve these dependencies: Keep the following packages at their current version: 1) libgfortran3 [Not Installed] Accept this solution? [Y/n/q/?] n Internal error: found 2 (choice -> promotion) mappings for a single choice. Internal error: found 2 (choice -> promotion) mappings for a single choice. The following actions will resolve these dependencies: Downgrade the following packages: 1) cpp-4.8 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 2) gcc-4.8 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 3) gcc-4.8-base [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 4) libasan0 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 5) libatomic1 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 6) libgcc-4.8-dev [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 7) libgomp1 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 8) libitm1 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 9) libquadmath0 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 10) libstdc++6 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] 11) libtsan0 [4.8.4-2ubuntu1~14.04 (now) -> 4.8.2-19ubuntu1 (trusty)] Accept this solution? [Y/n/q/?] y 

If you are getting an error like this:
在此处输入图像描述

This is telling you that the packages are already installed, but it has not installed all of the other packages it needs to work. You should be able to solve this by running this:

 sudo apt-get -f install 

(This command should automatically install the unmet dependencies.)

or something like this (with the relevant packages) :

 sudo apt-get install click curl dpkg-dev python-lzma python-requests imagemagick ubuntu-dev-tools 

But if you end up with this sort of error: cannot install package/package not available/no installation candidate etc

You can then search for ways to install them here or here .
With the above example, you should be able to find a page like this , and then use a PPA , or install a .deb for 32bit , or a .deb for 64bit .