[排错] 解决 openSUSE & SLES 升级系统时报错 “Can’t get available migrations from server: SUSE::Connect::ApiError: Multiple base products found:……”

报错代码

Can't get available migrations from server: SUSE::Connect::ApiError: Multiple base products found: ......

分析

当上一次升级失败或者升级回滚了以后可能会报此类错误

解决方法

方法一:通过 SUSEConnect 命令回滚

1.1 通过 SUSEConnect 命令回滚

# SUSEConnect –rollback

1.2 重新升级

(步骤略)

步骤二:取消注册再重新注册

2.1 取消注册再重新注册

(步骤略)

2.2 重新升级

(步骤略)

参考文献:

https://www.suse.com/support/kb/doc/?id=000019523

[内容] Linux 生命周期

Red Hat:

RHEL

English:

https://access.redhat.com/support/policy/updates/errata/#Extended_Life_Cycle_Phase

Or:

https://access.redhat.com/product-life-cycles?product=Red%20Hat%20Enterprise%20Linux

Chinese:

https://access.redhat.com/zh_CN/support/policy/updates/errata#Extended_Life_Cycle_Phase

Red Hat all products

https://access.redhat.com/product-life-cycles/update_policies

Red Hat software packages

https://access.redhat.com/support/policy/updates/rhel-app-streams-life-cycle?extIdCarryOver=true&sc_cid=701f2000001OH6fAAG

SUSE:

openSUSE

English:

https://en.opensuse.org/Lifetime

Chinese:

https://zh.opensuse.org/%E4%BD%BF%E7%94%A8%E6%9C%9F%E9%99%90

SLES

https://www.suse.com/lifecycle

[步骤] 系统升级 (从 openSUSE Leap 15.2 升级到 openSUSE Leap 15.3)

步骤一:显示现在的系统版本

# cat /etc/*release*
NAME="openSUSE Leap"
VERSION="15.2"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.2"
PRETTY_NAME="openSUSE Leap 15.2"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.2"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

(注意:确保显示的系统版本是 openSUSE Leap 15.2)

步骤二:准备升级

2.1 确认已使用的软件库

# zypper ls -d
#  | Alias                     | Name                               | Enabled | GPG Check | Refresh | Priority | Type   | URI
---+---------------------------+------------------------------------+---------+-----------+---------+----------+--------+---------------------------------------------------------------------------------------------
1  | repo-non-oss              | Non-OSS Repository                 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.2/repo/non-oss/
2  | repo-oss                  | Main Repository                    | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.2/repo/oss/
3  | repo-update               | Main Update Repository             | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.2/oss/
4  | repo-update-non-oss       | Update Repository (Non-Oss)        | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.2/non-oss/

(补充:确保以上软件库已处于 Enabled 状态)

2.2 刷新已使用的软件库

# zypper ref

(注意:确保刷新成功,否则请检查网络)

2.3 将所有 openSUSE Leap 15.2 软件包更新到最新版本

# zypper -n update

2.4 用 releasever 变量替换所有版本号

# sed -i 's/15.2/${releasever}/g' /etc/zypp/repos.d/*.repo

步骤三:升级系统

3.1 将版本号设置为 15.3 并刷新

# zypper --releasever=15.3 refresh

3.2 提前下载并安装 openSUSE Leap 15.3 所需的软件包

# zypper --releasever=15.3 dup --download-in-advance

3.3 升级系统

# zypper --releasever=15.3 dup

3.4 重启系统

# reboot

步骤四:后续检查

4.1 显示升级后的系统版本

# cat /etc/*release*
NAME="openSUSE Leap"
VERSION="15.3"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.3"
PRETTY_NAME="openSUSE Leap 15.3"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.3"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

4.2 显示升级后已使用的软件库

# zypper ls -d
#  | Alias                     | Name                                                         | Enabled | GPG Check | Refresh | Priority | Type   | URI
---+---------------------------+------------------------------------+---------+-----------+---------+----------+--------+---------------------------------------------------------------------------------------------
1  | repo-non-oss              | Non-OSS Repository                                           | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.3/repo/non-oss/
2  | repo-oss                  | Main Repository                                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/distribution/leap/15.3/repo/oss/
3 | repo-update                | Main Update Repository                                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.3/oss/
4 | repo-update-non-oss        | Update Repository (Non-Oss)                                  | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.3/non-oss/
4  | repo-backports-update     | Update repository of openSUSE Backports                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.3/backports/
5  | repo-sle-update           | Update repository with updates from SUSE Linux Enterprise 15 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | http://download.opensuse.org/update/leap/15.3/sle/

(注意:升级到 openSUSE Leap 15.3 系统后,自动新增加了 repo-backports-update 软件库和 repo-sle-update 软件库)

[内容] CVE 简介

内容一:什么叫 CVE

CVE 全称是:Common Vulnerabilities and Exposures,翻译成中文是:常见脆弱性和暴露,是一个业界统一的脆弱性和暴露。

内容二:CVE 的常用格式

CVE-2016-4658,其中 2016-4658 是编号

内容三:CVE 的用途

用于标签系统和应用的漏洞,并实现了一个漏洞数据库以进行漏洞的查询和管理

内容四:CVE 的网站

4.1 CVE 官方网站

https://www.cvedetails.com

4.2 RedHat CVE 官方网站

4.2.1 RedHat CVE 官方网站

https://access.redhat.com/security/security-updates/#/cve

4.2.2 RedHat CVE 勘误官方网站

https://access.redhat.com/management/errata

4.3 openSUSE CVE 官方网站

openSUSE CVE 安全补丁官方网站

https://lists.opensuse.org/archives/list/security-announce@lists.opensuse.org/

4.4 SUSE CVE 官方网站

SUSE CVE 安全补丁官方网站

https://www.suse.com/security/cve/

内容五:显示软件 CVE 信息

5.1 显示软件 CVE 信息的变更历史

# rpm -q openssh-clients --changelog | grep -i cve

(补充:这里以显示 openssh-clients 软件的 CVE 信息的变更历史为例)

5.2 显示软件现在的版本是否修复 CVE 漏洞

# rpm -qpi --changelog redis-6.0.14-6.8.1.x86_64.rpm |grep -E '32675'
- Fix CVE-2021-32675, Denial Of Service when processing RESP request
  (CVE-2021-32675, bsc#1191303)
  * cve-2021-32675.patch

(补充:这里以确认 redis-6.0.14-6.8.1.x86_64.rpm 软件包是否已修复 CVE-2021-32675 为例)