我正在尝试将 Acer Aspire 笔记本电脑上的 Ubuntu 从 10.04 更新到 12.04。不幸的是,我又启动了一次,结果被迫中止……真希望我现在不这么做……
现在更新管理器说我需要运行部分升级,因为之前的升级没有完成。当我运行它时,它告诉我系统包含损坏的软件包,并让我apt-get
在继续之前尝试使用或突触。
我运行了sudo apt-get update
它并且工作正常,但是sudo apt-get upgrade
返回:
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
libc-dev-bin: Depends: libc6 (< 2.12) but 2.15-0ubuntu10.3 is installed
libc6-dev: Depends: libc6 (= 2.11.1-0ubuntu7.10) but 2.15-0ubuntu10.3 is installed
libgssapi-krb5-2: Depends: libkrb5-3 (= 1.10+dfsg~beta1-2ubuntu0.3) but 1.8.1+dfsg-2ubuntu0.10 is installed
libkrb5-3: Depends: libkrb5support0 (= 1.8.1+dfsg-2ubuntu0.10) but 1.10+dfsg~beta1-2ubuntu0.3 is installed
libnih1: Depends: libc6 (< 2.12) but 2.15-0ubuntu10.3 is installed
python-louis: Depends: liblouis0 (>= 1.7.0-2) but it is not installable
E: Unmet dependencies. Try using -f.
所以我尝试了sudo apt-get -f install
一下,它告诉我的是:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
libc-dev-bin: Depends: libc6 (< 2.12) but 2.15-0ubuntu10.3 is installed
libc6-dev: Depends: libc6 (= 2.11.1-0ubuntu7.10) but 2.15-0ubuntu10.3 is installed
libgssapi-krb5-2: Depends: libkrb5-3 (= 1.10+dfsg~beta1-2ubuntu0.3) but 1.8.1+dfsg-2ubuntu0.10 is installed
libkrb5-3: Depends: libkrb5support0 (= 1.8.1+dfsg-2ubuntu0.10) but 1.10+dfsg~beta1-2ubuntu0.3 is installed
libnih1: Depends: libc6 (< 2.12) but 2.15-0ubuntu10.3 is installed
python-louis: Depends: liblouis0 (>= 1.7.0-2) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
这让我想到一个问题:什么是扣留包裹?
不管怎样,我接下来尝试了突触包管理器。它首先说
You have 7 broken packages on your system! Use the "Broken" filter to locate them.
这些是显示的包(仅六个):
libc-dev-bin
libc6-dev
libcssapi-krb5-2
libkrb5-3
libnih1
python-louis
我将它们标记为要删除,但是当我尝试应用时,它告诉我 3 个基本包被标记为要删除(顺便说一下,这些包我都没有标记):
e2fsprogs
hostname
util-linux
因此我取消了这些标记并尝试应用,但是:
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. *[several times!]*
E: Unable to correct dependencies
E: Unable to lock the download directory
我也尝试使用sudo do-release-upgrade
,但它返回了以下内容:
Investigating network-manager
Package network-manager has broken Depends on libnm-glib4
Considering libnm-glib4 0 as a solution to network-manager 3
Holding Back network-manager rather than change libnm-glib4
Investigating gnome-games
Package gnome-games has broken Depends on glchess
Considering glchess 1 as a solution to gnome-games 0
Holding Back gnome-games rather than change glchess
Done
Broken packages
Your system contains broken packages that couldn't be fixed with this
software. Please fix them first using synaptic or apt-get before
proceeding.
Preparing the upgrade failed
Preparing the system for the upgrade failed so a bug reporting
process is being started.
=== Command terminated with exit status 1 (Mon Feb 25 18:07:53 2013) ===
也许还值得一提的是,我最初尝试使用 ISO 映像磁盘,但它并没有给我通常的一组选项(例如“尝试 Ubuntu 12.04”、“升级到 Ubuntu 12.04”等)。相反,屏幕不断改变黑色的“阴影”,什么也没有产生......我知道磁盘有效,因为我以前用过一次。
我不是 Linux 专家——我是不是忽略了什么?我该如何进行升级?如果有必要,我甚至愿意清除计算机的硬盘。
非常感谢!
答案1
这让我想到一个问题:什么是扣留包裹?
保留软件包是 Ubuntu 团队专门设置为不升级的软件包。他们这样做通常是出于兼容性和/或稳定性的原因。
至于您的软件包损坏问题,您是否尝试过通过 GUI 进行操作?您可能能够执行所谓的部分升级,这可能会修复损坏的软件包。您可以尝试转到“系统更新”并让其扫描和更新。您可能需要重新启动计算机才能使所有内容生效。
另一个选项是进入“软件源”,确保选择了所有 Ubuntu 存储库(universe、multiverse、restricted),然后运行sudo apt-get update
。包括这些存储库将提供更多可用软件包,其中可能包括相关软件包的更新。
您也可以像尝试使用启动 CD 一样修复安装。如果您有另一台计算机,请将光盘放入另一台计算机以验证光盘是否仍然有效(您无需安装任何东西,只需查看它是否会带您进入您无法在此计算机上访问的设置屏幕)。如果没有,只需刻录另一张 CD,或者创建一个可启动的 USB(如果有),然后重试。
如果您愿意冒险进行全新安装,您可以尝试重新安装软件包(标记为卸载但您未标记的软件包依赖于您标记的软件包)。(修复损坏软件包的常用方法是卸载并重新安装有问题的软件包。)Linux 的一个优点是,在内存中运行的内容通常会保留在内存中,直到您告诉它退出或重新加载。这意味着,只要您在重新安装所有内容之前不重新启动,您就不会在此过程中导致系统崩溃。