3 个未升级的软件包阻止 Ubuntu 19.10 升级到 Ubuntu 20.04

3 个未升级的软件包阻止 Ubuntu 19.10 升级到 Ubuntu 20.04

我找到了升级说明Focal 发行说明,但当我按照它们操作时,它们不起作用。我遵循的步骤及其输出如下:

  • 您可以从 Ubuntu 18.04 LTS 或 Ubuntu 19.10 升级到 Ubuntu 20.04 LTS。

  • 升级之前,请确保已安装当前 Ubuntu 版本的所有更新。

输出sudo apt update

$ sudo apt update  
Get:2 https //download.docker.com/linux/ubuntu eoan InRelease [43.0 kB]  
Hit:1 https //packages.cloud.google.com/apt kubernetes-xenial InRelease  
Hit:3 http //old-releases.ubuntu.com/ubuntu eoan InRelease  
Hit:4 http //old-releases.ubuntu.com/ubuntu eoan-updates InRelease  
Hit:5 http //old-releases.ubuntu.com/ubuntu eoan-backports InRelease  
Hit:6 http //old-releases.ubuntu.com/ubuntu eoan-security InRelease  
Fetched 43.0 kB in 3s (15.9 kB/s)  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
42 packages can be upgraded. Run 'apt list --upgradable' to see them.  
  • 由于没有离线升级选项,请确认您还具有与官方镜像之一或本地可访问镜像的网络连接。
$ wget mirror.enzu.com.ubuntu  
--2021-02-15 22:33:09--  http://mirror.enzu.com.ubuntu/  
Resolving <MIRROR NAME> (<MIRROR NAME>)... 92.242.140.21  
Connecting to <MIRROR NAME> (<MIRROR NAME>)|92.242.140.21|:80... connected.  
HTTP request sent, awaiting response... 200 OK  
Length: unspecified [text/html]  
Saving to: ‘index.html’  
  
index.html                                          [ <=>                                                                                                   ]     894  --.-KB/s    in 0s  

2021-02-15 22:33:09 (9.06 MB/s) - ‘index.html’ saved [894]  
  • update-manager-core如果尚未安装,请安装。
$ sudo apt install update-manager-core  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
update-manager-core is already the newest version (1:19.04.8).  
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
  • /etc/update-manager/release-upgrades如果您使用的是 19.10,请确保将提示行设置为“normal”,如果您使用的是 18.04 LTS,请确保将提示行设置为“lts”。
$ grep Prompt /etc/update-manager/release-upgrades  
Prompt=normal
  • 使用命令启动升级工具sudo do-release-upgrade
$ sudo do-release-upgrade  
Checking for a new Ubuntu release  
Your Ubuntu release is not supported anymore.  
For upgrade information, please visit:  
http://www.ubuntu.com/releaseendoflife  

Please install all available updates for your release before upgrading.  

我做错了什么?我编辑了/etc/apt/sources.list以将其指向old-releases.ubuntu.comURL,并且看起来apt update成功了。为什么说明说我可以从特定版本执行此操作,却告诉我我无法执行此操作,因为我来自该版本?

任何能够帮助我解释这一点的人都将不胜感激。

$ sudo apt full-upgrade  
[sudo] password for dalex:  
Reading package lists... Done  
Building dependency tree  
Reading state information... Done  
Calculating upgrade... Done  
The following packages have been kept back:  
  kubeadm kubectl kubelet  
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.  

答案1

以下三个软件包无法升级,它们阻止升级到 20.04:kubeadm kubectl kubelet。这些软件包对操作系统来说不是必需的,升级后可以重新安装。卸载这三个无法升级的软件包,升级即可成功继续。

sudo apt remove kubeadm kubectl kubelet

这是尝试从 Ubuntu 16.10 升级到 Ubuntu 17.04 时发生的另一个错误示例。

The following packages have unmet dependencies:  
click-apparmor : Depends: python3-apparmor-click (= 0.3.17) but 0.3.18 is installed
libubuntu-app-launch4 : Depends: ubuntu-app-launch (= 0.12+17.04.20170404.2-0ubuntu2) but 0.9+16.10.20160928-0ubuntu1 is installed
ubuntu-app-launch-tools : Depends: ubuntu-app-launch (= 0.12+17.04.20170404.2-0ubuntu2) but 0.9+16.10.20160928-0ubuntu1 is installed
url-dispatcher-tools : Depends: url-dispatcher (= 0.1+17.04.20170328-0ubuntu2) but 0.1+16.10.20160816.1-0ubuntu1 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or 
specify a solution).

从错误消息中可以看出,16.10名称中包含 的三个软件包阻止了17.04名称中包含 的类似软件包的安装。要解决此错误,请卸载上述错误消息中名称中包含 16.10 的三个软件包。

相关内容