我目前正在使用 Ubuntu 15.10,但我想更新到 16.04。但更新程序说我的软件包损坏了。但在我看来,我的软件包损坏太多了,我不知道它们为什么会损坏……
当我使用 Synaptic 软件包管理器并单击“编辑”>“修复损坏的软件包”时,它什么也没发生,甚至什么都没有显示。
以下是我的损坏包裹的输出:
Broken perl-base:amd64 Breaks on perl-modules [ amd64 ] < 5.20.2-6ubuntu0.2 > ( perl ) (< 5.22.1~)
Broken perl-base:amd64 Breaks on perl-modules [ i386 ] < none > ( none ) (< 5.22.1~)
Broken findutils:amd64 Breaks on libpython3.4-minimal [ amd64 ] < 3.4.3-9ubuntu1 > ( python ) (< 3.4.4-2)
Broken libgnome-desktop-3-12:amd64 Breaks on libgnome-desktop-3-10 [ amd64 ] < 3.16.2-2ubuntu2 > ( libs )
Broken libmwaw-0.3-3:amd64 Conflicts on libmwaw-0.3-3v5 [ amd64 ] < 0.3.5-1ubuntu1 > ( libs )
Broken libodfgen-0.1-1:amd64 Conflicts on libodfgen-0.1-1v5 [ amd64 ] < 0.1.4-1ubuntu1 > ( libs )
Broken unity-control-center-faces:amd64 Conflicts on gnome-control-center-shared-data [ amd64 ] < 1:3.16.3-0ubuntu1 > ( gnome )
Broken php-cli:amd64 Depends on php7.0-cli [ amd64 ] < none -> 7.0.4-7ubuntu2 | 7.0.5-2+deb.sury.org~wily+1 > ( php )
Broken unity-lens-music:amd64 Conflicts on unity-scope-musicstores [ amd64 ] < 6.9.0+15.04.20141219-0ubuntu1 > ( gnome )
Broken php-json-schema:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken python3-click-package:amd64 Conflicts on python3-click [ amd64 ] < 0.4.39.1+15.10.20150702-0ubuntu2 -> 6.2-2ubuntu1 > ( universe/python )
Broken libmono-corlib2.0-cil:amd64 Depends on mono-runtime [ amd64 ] < 3.2.8+dfsg-4ubuntu4 -> 4.2.1.102+dfsg2-7ubuntu4 > ( interpreters ) (< 3.2.9)
Broken jsonlint:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken libmono-i18n-west2.0-cil:amd64 Depends on libmono-corlib2.0-cil [ amd64 ] < 3.2.8+dfsg-4ubuntu4 > ( cli-mono ) (>= 3.2.8)
Broken libpython3.4-stdlib:amd64 Depends on libpython3.4-minimal [ amd64 ] < 3.4.3-9ubuntu1 > ( python ) (= 3.4.3-9ubuntu1)
Broken libmetacity-private3a:amd64 Breaks on libmetacity-private3 [ amd64 ] < 1:3.17.2-4ubuntu1 > ( libs ) (< 1:3.18)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken libmono-system2.0-cil:amd64 Depends on libmono-corlib2.0-cil [ amd64 ] < 3.2.8+dfsg-4ubuntu4 > ( cli-mono ) (>= 3.2.8)
Broken libcdr-0.1-1:amd64 Conflicts on libcdr-0.1-1v5 [ amd64 ] < 0.1.1-2ubuntu1 > ( libs )
Broken libmono-security2.0-cil:amd64 Depends on libmono-corlib2.0-cil [ amd64 ] < 3.2.8+dfsg-4ubuntu4 > ( cli-mono ) (>= 3.2.8)
Broken libcheese7:amd64 Depends on cheese-common [ amd64 ] < 3.16.1-1ubuntu2 -> 3.18.1-2ubuntu3 > ( gnome ) (= 3.16.1-1ubuntu2)
Broken tzdata-java:amd64 Depends on tzdata [ amd64 ] < 2016d-0ubuntu0.15.10 -> 2016d-0ubuntu0.16.04 > ( libs ) (= 2016d-0ubuntu0.15.10)
Broken libmono-posix2.0-cil:amd64 Depends on libmono-corlib2.0-cil [ amd64 ] < 3.2.8+dfsg-4ubuntu4 > ( cli-mono ) (>= 3.2.8)
Broken libwpd-0.10-10v5:amd64 Depends on libwpd-0.10-10 [ amd64 ] < 0.10.0-2ubuntu4 -> 0.10.1-1ubuntu1 > ( libs ) (= 0.10.0-2ubuntu4)
Broken xserver-xorg-input-mouse:amd64 Depends on xorg-input-abi-21 [ amd64 ] < none > ( none )
Broken libperl5.20:amd64 Depends on perl-base [ amd64 ] < 5.20.2-6ubuntu0.2 -> 5.22.1-9 > ( perl ) (= 5.20.2-6ubuntu0.2)
Broken libmono-corlib4.0-cil:amd64 Depends on mono-runtime [ amd64 ] < 3.2.8+dfsg-4ubuntu4 -> 4.2.1.102+dfsg2-7ubuntu4 > ( interpreters ) (< 3.2.9)
Broken libcheese-gtk23:amd64 Depends on libcheese7 [ amd64 ] < 3.16.1-1ubuntu2 > ( libs ) (>= 3.4.0)
Broken libplank0:amd64 Depends on libplank-common [ amd64 ] < 0.10.1-1 -> 0.11.1-1 > ( universe/utils ) (= 0.10.1-1)
Broken libhunspell-1.3-0v5:amd64 Depends on libhunspell-1.3-0 [ amd64 ] < 1.3.3-3ubuntu3 -> 1.3.3-4ubuntu1 > ( libs ) (= 1.3.3-3ubuntu3)
Broken checkbox-ng-service:amd64 Depends on checkbox-ng [ amd64 ] < 0.20.1-1 -> 0.23-2 > ( utils ) (= 0.20.1-1)
Broken findutils:amd64 Breaks on libpython3.4-minimal [ amd64 ] < 3.4.3-9ubuntu1 > ( python ) (< 3.4.4-2)
Broken openjdk-7-jre-headless:amd64 Depends on tzdata-java [ amd64 ] < 2016d-0ubuntu0.15.10 > ( java )
Broken libpython3.4-stdlib:amd64 Depends on libpython3.4-minimal [ amd64 ] < 3.4.3-9ubuntu1 > ( python ) (= 3.4.3-9ubuntu1)
Broken php-composer-spdx-licenses:amd64 Breaks on composer [ amd64 ] < 1.0.0~alpha10+20150602-1 -> 1.0.0~beta2-1 > ( universe/php ) (< 1.0.0~alpha11)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken tzdata-java:amd64 Depends on tzdata [ amd64 ] < 2016d-0ubuntu0.15.10 -> 2016d-0ubuntu0.16.04 > ( libs ) (= 2016d-0ubuntu0.15.10)
Broken findutils:amd64 Breaks on libpython3.4-minimal [ amd64 ] < 3.4.3-9ubuntu1 > ( python ) (< 3.4.4-2)
Broken openjdk-7-jre-headless:amd64 Depends on tzdata-java [ amd64 ] < 2016d-0ubuntu0.15.10 > ( java )
Broken libpython3.4-stdlib:amd64 Depends on libpython3.4-minimal [ amd64 ] < 3.4.3-9ubuntu1 > ( python ) (= 3.4.3-9ubuntu1)
Broken php-composer-spdx-licenses:amd64 Breaks on composer [ amd64 ] < 1.0.0~alpha10+20150602-1 -> 1.0.0~beta2-1 > ( universe/php ) (< 1.0.0~alpha11)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken python3.4:amd64 Depends on libpython3.4-stdlib [ amd64 ] < 3.4.3-9ubuntu1 > ( python ) (= 3.4.3-9ubuntu1)
Broken python3.4-minimal:amd64 Depends on libpython3.4-minimal [ amd64 ] < 3.4.3-9ubuntu1 > ( python ) (= 3.4.3-9ubuntu1)
Broken tzdata-java:amd64 Depends on tzdata [ amd64 ] < 2016d-0ubuntu0.15.10 -> 2016d-0ubuntu0.16.04 > ( libs ) (= 2016d-0ubuntu0.15.10)
Broken libpython3.4:amd64 Depends on libpython3.4-stdlib [ amd64 ] < 3.4.3-9ubuntu1 > ( python ) (= 3.4.3-9ubuntu1)
Broken openjdk-7-jre-headless:amd64 Depends on tzdata-java [ amd64 ] < 2016d-0ubuntu0.15.10 > ( java )
Broken php-composer-spdx-licenses:amd64 Breaks on composer [ amd64 ] < 1.0.0~alpha10+20150602-1 -> 1.0.0~beta2-1 > ( universe/php ) (< 1.0.0~alpha11)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken openjdk-7-jre:amd64 Depends on openjdk-7-jre-headless [ amd64 ] < 7u95-2.6.4-0ubuntu0.15.10.2 > ( java ) (= 7u95-2.6.4-0ubuntu0.15.10.2)
Broken openjdk-7-jdk:amd64 Depends on openjdk-7-jre [ amd64 ] < 7u95-2.6.4-0ubuntu0.15.10.2 > ( java ) (= 7u95-2.6.4-0ubuntu0.15.10.2)
Broken php-composer-spdx-licenses:amd64 Breaks on composer [ amd64 ] < 1.0.0~alpha10+20150602-1 -> 1.0.0~beta2-1 > ( universe/php ) (< 1.0.0~alpha11)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken php-composer-spdx-licenses:amd64 Breaks on composer [ amd64 ] < 1.0.0~alpha10+20150602-1 -> 1.0.0~beta2-1 > ( universe/php ) (< 1.0.0~alpha11)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken php-composer-spdx-licenses:amd64 Breaks on composer [ amd64 ] < 1.0.0~alpha10+20150602-1 -> 1.0.0~beta2-1 > ( universe/php ) (< 1.0.0~alpha11)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken php-composer-spdx-licenses:amd64 Breaks on composer [ amd64 ] < 1.0.0~alpha10+20150602-1 -> 1.0.0~beta2-1 > ( universe/php ) (< 1.0.0~alpha11)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken php-composer-spdx-licenses:amd64 Breaks on composer [ amd64 ] < 1.0.0~alpha10+20150602-1 -> 1.0.0~beta2-1 > ( universe/php ) (< 1.0.0~alpha11)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
Broken php-composer-spdx-licenses:amd64 Breaks on composer [ amd64 ] < 1.0.0~alpha10+20150602-1 -> 1.0.0~beta2-1 > ( universe/php ) (< 1.0.0~alpha11)
Broken composer:amd64 Depends on php-cli [ amd64 ] < none -> 1:7.0+35ubuntu6 > ( php )
我该如何解决这一切?谢谢
答案1
通常此问题的原因是由于包更新失败/中断。
如果由依赖性导致:
sudo apt-get clean
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get update
如果您收到以下错误之一:
- 遇到没有 Package: 标头的部分
- MergeList 存在问题…
- 无法解析或打开包列表或状态文件。
删除并重建软件包列表:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update
如果你收到以下错误
- 无法获取锁 /var/cache/apt/archives/lock – open (11:资源暂时不可用)
尝试以下
sudo fuser -cuk /var/lib/dpkg/lock
sudo rm -f /var/lib/dpkg/lock
sudo fuser -cuk /var/cache/apt/archives/lock
sudo rm -f /var/cache/apt/archives/lock
如果由于‘已安装软件包的依赖关系未得到满足’而导致,请在‘Synaptic 软件包管理器’中修复:
- 打开 Synaptic 包管理器
- 点击“状态”(左侧)
- 选择“破损”
- 移除破损的包装
答案2
每次我运行“sudo apt-get update”时,我都会看到一堆 IGN/ignores..所以我手动修改了源列表(sudo gedit /etc/apt/sources.list)并使用我从中重新生成的列表名称更新了列表名称https://repogen.simplylinux.ch/generate.php
或者直接复制这些内容:
Ubuntu 主要存储库deb http://us.archive.ubuntu.com/ubuntu/ artful main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ artful main restricted universe multiverse