尝试从 14 升级到 16(或 18),但出现“升级前,请安装适用于您的版本的所有可用更新”。

尝试从 14 升级到 16(或 18),但出现“升级前,请安装适用于您的版本的所有可用更新”。

我已经跑了

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

并认为已经解决了所有错误,但现在运行时sudo do-release-upgrade仍然出现:

Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

apt-get-update:

root@shop-update:/# apt-get update
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Ign:2 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 InRelease
Hit:3 http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 Release
Hit:5 http://ppa.launchpad.net/certbot/certbot/ubuntu xenial InRelease
Hit:6 https://repos.sonar.digitalocean.com/apt main InRelease
Hit:7 https://deb.nodesource.com/node_6.x xenial InRelease
Hit:8 http://nyc2.mirrors.digitalocean.com/ubuntu xenial InRelease
Hit:9 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Hit:10 http://nyc2.mirrors.digitalocean.com/ubuntu xenial-backports InRelease
Fetched 107 kB in 1s (97.4 kB/s)
Reading package lists... Done

apt-get 升级:

root@shop-update:/# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  cloud-init
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

答案1

升级被阻止,因为 apt-get upgrade 的输出显示:

以下软件包已被保留:(
部分软件包列表)

你应该首先解决这个问题。如果你打算安装“保留”的软件包,请参阅此答案:

“以下包裹已被保留:”为什么以及我该如何解决?

相关内容