基于以下环境安装 VirtualBox 和 Ubuntu Server:
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.5 LTS
Release: 20.04
Codename: focal
和
neofetch --off
------------------------
OS: Ubuntu 20.04.5 LTS x86_64
Host: VirtualBox 1.2
Kernel: 5.4.0-125-generic
Uptime: 17 mins
Packages: 1272 (dpkg), 5 (snap)
Shell: bash 5.0.17
Resolution: preferred
Terminal: /dev/pts/0
CPU: Intel i5-3230M (2) @ 2.594GHz
GPU: 00:02.0 VMware SVGA II Adapter
Memory: 236MiB / 3883MiB
基于这两个有价值的教程:
我确实执行了以下步骤:
sudo apt-mark showhold # Returns nothing
sudo apt-mark unhold <packagename> # Not necessary as above returned nothing
sudo apt update
sudo apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
mysql-client mysql-server
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
sudo reboot
sudo apt full-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
mysql-client mysql-server
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
sudo apt --purge autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
sudo apt install update-manager-core # It to install 'do-release-upgrade'
sudo do-release-upgrade -c
Checking for a new Ubuntu release
New release '22.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
sudo do-release-upgrade # <---- final step
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
我确实执行了上述过程两次以防万一,但总是出现以下消息:
Please install all available updates for your release before upgrading
如何解决这种情况?
笔记为了以防万一,我ssh
在同一个局域网中执行此过程。
笔记在其他虚拟机中,现在升级过程正在进行,但它适用于 Ubuntu 服务器 18 到 20...因此,共享的步骤说明似乎是正确的
答案1
我在其他虚拟机中也遇到了同样的情况。
因此根据以下部分:
The following packages have been kept back:
mysql-client mysql-server
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
它在原帖中出现了两次,下面这行
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded
总共出现三次。
因此,这2 not upgraded
是问题的指标。
解决方案
对于这种特定情况,必须删除MySQL
- 也许您有更多软件存在这种情况。然后考虑删除它们。当然,请记住从一开始就进行备份。