升级到 Ubuntu 18.04 时出错

升级到 Ubuntu 18.04 时出错

我正在尝试升级到 Ubuntu 18.04,但 do-release 升级失败。apt.log 中有很多损坏的软件包。但我害怕删除它们。我不知道需要删除哪些。

Starting pkgProblemResolver with broken count: 6
 Starting 2 pkgProblemResolver with broken count: 6
 Investigating (0) systemd-sysv [ amd64 ] < 229-4ubuntu21.15 -> 237-3ubuntu10.11 > ( admin )
 Broken systemd-sysv:amd64 Conflicts on systemd-shim [ amd64 ] < 9-1bzr4ubuntu1 > ( admin )
   Considering systemd-shim:amd64 2 as a solution to systemd-sysv:amd64 117
   Added systemd-shim:amd64 to the remove list
   Fixing systemd-sysv:amd64 via remove of systemd-shim:amd64
   MarkDelete systemd-shim [ amd64 ] < 9-1bzr4ubuntu1 > ( admin ) FU=0
 Investigating (0) libcurl3 [ amd64 ] < 7.47.0-1ubuntu2.11 -> 7.58.0-2ubuntu2 > ( universe/libs )
 Broken libcurl3:amd64 Conflicts on libcurl4 [ amd64 ] < none -> 7.58.0-2ubuntu3.5 > ( libs )
   Considering libcurl4:amd64 -1 as a solution to libcurl3:amd64 2
   Added libcurl4:amd64 to the remove list
   Conflicts//Breaks against version 7.58.0-2ubuntu3 for libcurl4 but that is not InstVer, ignoring
   Fixing libcurl3:amd64 via keep of libcurl4:amd64
   MarkKeep libcurl4 [ amd64 ] < none -> 7.58.0-2ubuntu3.5 > ( libs ) FU=0
 Investigating (0) libglib2.0-dev [ amd64 ] < none -> 2.56.3-0ubuntu0.18.04.1 > ( libdevel )
 Broken libglib2.0-dev:amd64 Depends on libpcre3-dev [ amd64 ] < none -> 2:8.39-9 > ( libdevel ) (>= 1:8.31)
   Considering libpcre3-dev:amd64 0 as a solution to libglib2.0-dev:amd64 0
   MarkKeep libglib2.0-dev [ amd64 ] < none -> 2.56.3-0ubuntu0.18.04.1 > ( libdevel ) FU=0
   Holding Back libglib2.0-dev:amd64 rather than change libpcre3-dev:amd64
 Investigating (0) curl [ amd64 ] < 7.47.0-1ubuntu2.11 -> 7.58.0-2ubuntu3.5 > ( web )
 Broken curl:amd64 Depends on libcurl4 [ amd64 ] < none -> 7.58.0-2ubuntu3.5 > ( libs ) (= 7.58.0-2ubuntu3.5)
   Considering libcurl4:amd64 -1 as a solution to curl:amd64 0
   MarkKeep curl [ amd64 ] < 7.47.0-1ubuntu2.11 -> 7.58.0-2ubuntu3.5 > ( web ) FU=0
   Removing curl:amd64 rather than change libcurl4:amd64
   MarkDelete curl [ amd64 ] < 7.47.0-1ubuntu2.11 -> 7.58.0-2ubuntu3.5 > ( web ) FU=0
 Investigating (0) libharfbuzz-dev [ amd64 ] < none -> 1.7.2-1ubuntu1 > ( libdevel )
 Broken libharfbuzz-dev:amd64 Depends on libglib2.0-dev [ amd64 ] < none -> 2.56.3-0ubuntu0.18.04.1 > ( libdevel ) (>= 2.19.1)
   Considering libglib2.0-dev:amd64 0 as a solution to libharfbuzz-dev:amd64 0
   MarkKeep libharfbuzz-dev [ amd64 ] < none -> 1.7.2-1ubuntu1 > ( libdevel ) FU=0
   Holding Back libharfbuzz-dev:amd64 rather than change libglib2.0-dev:amd64
 Investigating (0) perl-modules-5.22 [ amd64 ] < 5.22.1-9ubuntu0.6 > ( perl )
 Broken perl-modules-5.22:amd64 Conflicts on perl-modules [ amd64 ] < none ->  | 5.18.2-2ubuntu1.7 > ( perl )
   Conflicts//Breaks against version 5.18.2-2ubuntu1.7 for perl-modules but that is not InstVer, ignoring
   Considering perl-modules-5.26:amd64 44 as a solution to perl-modules-5.22:amd64 -1
   Removing perl-modules-5.22:amd64 rather than change perl-modules:amd64
   MarkDelete perl-modules-5.22 [ amd64 ] < 5.22.1-9ubuntu0.6 > ( perl ) FU=0
 Investigating (0) libperl5.22 [ amd64 ] < 5.22.1-9ubuntu0.6 > ( libs )
 Broken libperl5.22:amd64 Depends on perl-modules-5.22 [ amd64 ] < 5.22.1-9ubuntu0.6 > ( perl ) (>= 5.22.1-9ubuntu0.6)
   Considering perl-modules-5.22:amd64 -1 as a solution to libperl5.22:amd64 -2
   Removing libperl5.22:amd64 rather than change perl-modules-5.22:amd64
   MarkDelete libperl5.22 [ amd64 ] < 5.22.1-9ubuntu0.6 > ( libs ) FU=0
 Investigating (1) libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
 Broken libicu-le-hb-dev:amd64 Depends on libharfbuzz-dev [ amd64 ] < none -> 1.7.2-1ubuntu1 > ( libdevel )
   Considering libharfbuzz-dev:amd64 0 as a solution to libicu-le-hb-dev:amd64 2
   MarkKeep libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel ) FU=0
   Holding Back libicu-le-hb-dev:amd64 rather than change libharfbuzz-dev:amd64
 Investigating (1) libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken libicu-dev:amd64 Depends on libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
   Considering libicu-le-hb-dev:amd64 2 as a solution to libicu-dev:amd64 2
   MarkKeep libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) FU=0
   Holding Back libicu-dev:amd64 rather than change libicu-le-hb-dev:amd64
 Investigating (2) icu-devtools [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken icu-devtools:amd64 Breaks on libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) (< 60.2-3ubuntu3)
   Considering libicu-dev:amd64 2 as a solution to icu-devtools:amd64 3
   Upgrading libicu-dev:amd64 due to Breaks field in icu-devtools:amd64
 Investigating (2) libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken libicu-dev:amd64 Depends on libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
   Considering libicu-le-hb-dev:amd64 2 as a solution to libicu-dev:amd64 2
   MarkKeep libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) FU=0
   Holding Back libicu-dev:amd64 rather than change libicu-le-hb-dev:amd64
 Investigating (3) icu-devtools [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken icu-devtools:amd64 Breaks on libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) (< 60.2-3ubuntu3)
   Considering libicu-dev:amd64 2 as a solution to icu-devtools:amd64 3
   Upgrading libicu-dev:amd64 due to Breaks field in icu-devtools:amd64
 Investigating (3) libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken libicu-dev:amd64 Depends on libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
   Considering libicu-le-hb-dev:amd64 2 as a solution to libicu-dev:amd64 2
   MarkKeep libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) FU=0
   Holding Back libicu-dev:amd64 rather than change libicu-le-hb-dev:amd64
 Investigating (4) icu-devtools [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken icu-devtools:amd64 Breaks on libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) (< 60.2-3ubuntu3)
   Considering libicu-dev:amd64 2 as a solution to icu-devtools:amd64 3
   Upgrading libicu-dev:amd64 due to Breaks field in icu-devtools:amd64
 Investigating (4) libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken libicu-dev:amd64 Depends on libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
   Considering libicu-le-hb-dev:amd64 2 as a solution to libicu-dev:amd64 2
   MarkKeep libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) FU=0
   Holding Back libicu-dev:amd64 rather than change libicu-le-hb-dev:amd64
 Investigating (5) icu-devtools [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken icu-devtools:amd64 Breaks on libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) (< 60.2-3ubuntu3)
   Considering libicu-dev:amd64 2 as a solution to icu-devtools:amd64 3
   Upgrading libicu-dev:amd64 due to Breaks field in icu-devtools:amd64
 Investigating (5) libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken libicu-dev:amd64 Depends on libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
   Considering libicu-le-hb-dev:amd64 2 as a solution to libicu-dev:amd64 2
   MarkKeep libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) FU=0
   Holding Back libicu-dev:amd64 rather than change libicu-le-hb-dev:amd64
 Investigating (6) icu-devtools [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken icu-devtools:amd64 Breaks on libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) (< 60.2-3ubuntu3)
   Considering libicu-dev:amd64 2 as a solution to icu-devtools:amd64 3
   Upgrading libicu-dev:amd64 due to Breaks field in icu-devtools:amd64
 Investigating (6) libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken libicu-dev:amd64 Depends on libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
   Considering libicu-le-hb-dev:amd64 2 as a solution to libicu-dev:amd64 2
   MarkKeep libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) FU=0
   Holding Back libicu-dev:amd64 rather than change libicu-le-hb-dev:amd64
 Investigating (7) icu-devtools [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken icu-devtools:amd64 Breaks on libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) (< 60.2-3ubuntu3)
   Considering libicu-dev:amd64 2 as a solution to icu-devtools:amd64 3
   Upgrading libicu-dev:amd64 due to Breaks field in icu-devtools:amd64
 Investigating (7) libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken libicu-dev:amd64 Depends on libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
   Considering libicu-le-hb-dev:amd64 2 as a solution to libicu-dev:amd64 2
   MarkKeep libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) FU=0
   Holding Back libicu-dev:amd64 rather than change libicu-le-hb-dev:amd64
 Investigating (8) icu-devtools [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken icu-devtools:amd64 Breaks on libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) (< 60.2-3ubuntu3)
   Considering libicu-dev:amd64 2 as a solution to icu-devtools:amd64 3
   Upgrading libicu-dev:amd64 due to Breaks field in icu-devtools:amd64
 Investigating (8) libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken libicu-dev:amd64 Depends on libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
   Considering libicu-le-hb-dev:amd64 2 as a solution to libicu-dev:amd64 2
   MarkKeep libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) FU=0
   Holding Back libicu-dev:amd64 rather than change libicu-le-hb-dev:amd64
 Investigating (9) icu-devtools [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken icu-devtools:amd64 Breaks on libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) (< 60.2-3ubuntu3)
   Considering libicu-dev:amd64 2 as a solution to icu-devtools:amd64 3
   Upgrading libicu-dev:amd64 due to Breaks field in icu-devtools:amd64
 Investigating (9) libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel )
 Broken libicu-dev:amd64 Depends on libicu-le-hb-dev [ amd64 ] < none -> 1.0.3+git161113-4 > ( libdevel )
   Considering libicu-le-hb-dev:amd64 2 as a solution to libicu-dev:amd64 2
   MarkKeep libicu-dev [ amd64 ] < 55.1-7ubuntu0.4 -> 60.2-3ubuntu3 > ( libdevel ) FU=0
   Holding Back libicu-dev:amd64 rather than change libicu-le-hb-dev:amd64

来源列表

#######################################################################################
# Hetzner APT-Mirror
#
# deb http://mirror.hetzner.de/ubuntu/packages xenial main restricted universe multiverse # disabled on upgrade to xenial
# deb http://mirror.hetzner.de/ubuntu/packages trusty-backports main restricted universe multiverse # disabled on upgrade to xenial
# deb http://mirror.hetzner.de/ubuntu/packages trusty-updates main restricted universe multiverse # disabled on upgrade to xenial
# deb http://mirror.hetzner.de/ubuntu/security trusty-security main restricted universe multiverse # disabled on upgrade to xenial

#deb http://mirror.hetzner.de/ubuntu/packages xenial           main restricted universe multiverse
#deb http://mirror.hetzner.de/ubuntu/packages xenial-updates   main restricted universe multiverse
#deb http://mirror.hetzner.de/ubuntu/packages xenial-backports main restricted universe multiverse
#deb http://mirror.hetzner.de/ubuntu/packages xenial-security  main restricted universe multiverse

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial universe
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://de.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## Uncomment the following two lines to add software from Ubuntu's
## 'extras' repository.

sources.list.d/mosquitto-dev-mosquitto-ppa-trusty.list

deb http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu xenial main # disabled on upgrade to xenial
# deb-src http://ppa.launchpad.net/mosquitto-dev/mosquitto-ppa/ubuntu trusty main

来源.list.d/ondrej-php-trusty.list

deb http://ppa.launchpad.net/ondrej/php/ubuntu xenial main # disabled on upgrade to xenial
# deb-src http://ppa.launchpad.net/ondrej/php/ubuntu trusty main

答案1

知道了。

使用以下命令删除 PPA。

sudo ppa-purge ppa:whatever/ppa

此后,do-release-upgrade 顺利完成。

感谢@s1mmel 和@user535733 的帮助。

答案2

似乎有损坏的软件包。需要先修复这些损坏的依赖项。在进行版本升级之前,请尝试以下操作。

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

这样您的系统上就有最新的软件包了。这应该在版本升级之前完成。

如果遇到依赖错误,可以尝试通过以下方式摆脱它们

sudo apt-get update --fix-missing

和/或

sudo dpkg –configure -a

和/或

sudo apt-get install -f

如果仍然不起作用,请尝试此操作

使用以下命令删除锁文件:

sudo rm /var/lib/apt/lists/lock

您可能还需要删除缓存目录中的锁定文件

sudo rm /var/cache/apt/archives/lock

在您升级到最后的软件包并且损坏的软件包被修复之后,您应该能够毫无问题地进行干净的发布升级。

相关内容