【问题标题】:apt-get is broken and can't install anythingapt-get 坏了,无法安装任何东西
【发布时间】:2017-10-25 17:31:16
【问题描述】:

我的 apt-get 完全坏了,无法安装任何东西。 'apt-get install -f' 的输出如下:

# apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
 gnome-icon-theme : Depends: gtk-update-icon-cache
 python3-cairo : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
 python3-gdbm : Depends: python3 (>= 3.6) but 3.4.3-1 is installed
 python3-reportlab-accel : Depends: python3 (>= 3.6~) but 3.4.3-1 is installed
 rhythmbox : Depends: rhythmbox-data (= 3.1-1ubuntu3) but 3.4.1-2ubuntu5 is installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

'sudo apt install python3'的输出如图:https://imgur.com/a/IbGK0

我在 Google 上搜索了所有可能的问题并尝试了任何可能的解决方案,但没有人为它工作。

【问题讨论】:

  • 您是否尝试过这里描述的步骤:askubuntu.com/questions/140246/…
  • 是的,我试过了,但没有帮助。任何关于“apt”和“install”的命令都被破坏了。输出如下:
  • # sudo apt-get clean # sudo apt-get autoclean 读取包列表...完成 构建依赖关系树 读取状态信息...完成 # sudo apt-get -f install 读取包列表.. . 完成 构建依赖关系树 读取状态信息... 完成 纠正依赖关系... 失败。以下软件包具有未满足的依赖关系: gnome-icon-theme : Depends: gtk-update-icon-cache python3-cairo : Depends: python3 (>= 3.6~) 但安装了 3.4.3-1 ...... ..(与 'apt-get install -f' 的输出相同)
  • 执行“sudo apt-install python3”会得到什么?
  • # sudo apt install python3 Reading package lists... Done Building dependency tree Reading state information... Done 您可能需要运行 'apt-get -f install' 来纠正这些问题:以下包有未满足的依赖关系:gnome-icon-theme :依赖:gtk-update-icon-cache

标签: installation ubuntu-16.04 apt-get apt


【解决方案1】:

转到 /var/log/dist-upgrade/apt.log 并找出损坏的软件包。 “apt-get remove”软件包,进行发布升级,然后您应该能够重新安装它们。

您可以在这里找到更多信息:https://askubuntu.com/questions/124845/eerror-pkgproblemresolverresolve-generated-breaks-this-may-be-caused-by-hel

【讨论】:

  • 我的包存在依赖问题,我已被sudo apt-get remove <packageName> 删除,然后运行sudo apt update && sudo apt upgrade 进行升级,之后一切正常
【解决方案2】:

这个命令解决了我的错误

sudo apt -f 安装

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-09-19
    • 2022-12-16
    • 2013-06-29
    • 1970-01-01
    • 2018-09-20
    • 1970-01-01
    • 2019-02-28
    • 2020-07-31
    相关资源
    最近更新 更多