Ubuntu升级提示'The following security updates require Ubuntu Pro with 'esm-infra' enabled'

今天老白博客@老白尝试将服务器Ubuntu18升级到20/22的时候,总是提示“Please install all available updates for your release before upgrading”,然后一看又是“0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded”,尝试了各种方法都是升级不成功。开始以为遇到“apt-get锁”了,后面发现应该是这个所谓的“Ubuntu Pro”的原因。

Ubuntu升级提示'The following security updates require Ubuntu Pro with 'esm-infra' enabled'

对于上述问题,在外网找到了相关回答:

(原文地址:https://www.nixcraft.com/t/the-following-security-updates-require-ubuntu-pro-with-esm-apps-enable/4492)

  1. You can get Ubuntu Pro for up to 5 machines free of cost for desktop/server/VM usage[1].
    您最多可以为 5 台机器免费获得 Ubuntu Pro,用于桌面/服务器/虚拟机使用[1]。
  2. Login https://ubuntu.com/pro/dashboard or Ubuntu Pro | Ubuntu at
    登录 https://ubuntu.com/pro/dashboard 或 Ubuntu Pro |Ubuntu at
  3. You will see your key or Token at https://ubuntu.com/pro/dashboard
    您将在 https://ubuntu.com/pro/dashboard 看到您的密钥或令牌
  4. Copy the Token/key and run the following command:
    复制令牌/密钥并运行以下命令:
sudo apt update && sudo apt upgrade
pro --version
sudo pro attach [YOUR_TOKEN]

Ubuntu Pro相关概述

什么是 ESM 应用程序,Ubuntu Pro 之间是什么关系?

Ubuntu pro reduces your average CVE exposure time from 98 days to 1 day. In addition, it includes expanded CVE patching, ten years of security maintenance, optional support and operations for the full stack of open-source applications.
Ubuntu 专业版将您的平均 CVE 暴露时间从 98 天减少到 1 天。此外,它还包括扩展的 CVE 修补、十年的安全维护、针对全栈开源应用程序的可选支持和操作。

In other words, ESM Apps is the designation used by Canonical for the packages in the Universe repository that gets ten years of security updates with an Ubuntu Pro subscription.
换句话说,ESM Apps是Canonical用于Universe存储库中的软件包的名称,该软件包通过Ubuntu Pro订阅获得十年的安全更新。

Ubuntu Pro 订阅是免费的吗?

Individual users can get a token for up to 5 free machines, including physical (bare metal server) or virtual machines (VM). But it is a paid service for companies or commercial entities.
单个用户可以获取最多 5 台免费计算机的令牌,包括物理(裸机服务器)或虚拟机 (VM)。但它是公司或商业实体的付费服务。

More info: Ubuntu Pro description | Ubuntu