无法从20.03 LTS升级到24.03_LTS_SP2

$ cat /etc/os-release
NAME="openEuler"
VERSION="20.03 (LTS)"
ID="openEuler"
VERSION_ID="20.03"
PRETTY_NAME="openEuler 20.03 (LTS)"
ANSI_COLOR="0;31"

按照 升降级指导 | 文档 | openEuler社区,尝试升级到22.03-LTS-SP1和24.03-LTS-SP2均升级失败。

24.03-LTS-SP2尝试的更改为: 文件名变更为 /etc/yum.repos.d/openEuler-24.03-LTS-SP2.repo,然后将文件中的22.03-LTS-SP1均修改为24.03-LTS-SP2,其他未变。

[SP1_OS]
name=SP1_OS
baseurl=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/OS/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/OS/$basearch/RPM-GPG-KEY-openEuler

[SP1_everything]
name=SP1_everything
baseurl=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/everything/$basearch/RPM-GPG-KEY-openEuler

[SP1_EPOL]
name=SP1_EPOL
baseurl=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/EPOL/main/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/OS/$basearch/RPM-GPG-KEY-openEuler

[SP1_debuginfo]
name=SP1_debuginfo
baseurl=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/debuginfo/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/debuginfo/$basearch/RPM-GPG-KEY-openEuler

[SP1_source]
name=SP1_source
baseurl=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/source/
enabled=1
gpgcheck=1
gpgkey=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/source/RPM-GPG-KEY-openEuler

[SP1_update]
name=SP1_update
baseurl=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/update/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.openeuler.org/openEuler-24.03-LTS-SP2/OS/$basearch/RPM-GPG-KEY-openEuler

使用dnf update | tee update_log的结果如下:

[root@localhost ~]# dnf update | tee update_log
SP1_OS                                          121 kB/s | 2.8 MB     00:23
SP1_everything                                  0.0  B/s |   0  B     02:00
Error: Failed to download metadata for repo 'SP1_everything': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

22.03-LTS-SP1尝试的结果如下:

[lqw@localhost ~]$ sudo dnf update | tee update_log
SP1_OS                                          0.0  B/s |   0  B     02:01
Error: Failed to download metadata for repo 'SP1_OS': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried

请问是否无法跨版本升级?还是我的操作有误?

在我的环境试了一下你配置的 repo 源是可以访问的,但是官方的源非常慢,建议尝试使用其他镜像源测试一下:

【汇总贴】openEuler常用repo源 - Migration 迁移 - openEuler 论坛

1 个赞

dnf distro-sync -y --releasever=“24.03LTS_SP2”

试一下这个命令,我从22.03升到24.03

1 个赞

请修改双引号改为英文的双引号。否则会导致其他人复制粘贴报错 @suibll

我将baseurl中的 openeuler.org…改为 repo.huaweicloud.com/openeuler 之后:

/etc/yum.repos.d/openEuler-24.03-LTS-SP2.repo
[lqw@localhost ~]$ sudo cat /etc/yum.repos.d/openEuler-24.03-LTS-SP2.repo
[sudo] password for lqw:
[SP1_OS]
name=SP1_OS
baseurl=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/OS/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/OS/$basearch/RPM-GPG-KEY-openEuler

[SP1_everything]
name=SP1_everything
baseurl=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/everything/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/everything/$basearch/RPM-GPG-KEY-openEuler

[SP1_EPOL]
name=SP1_EPOL
baseurl=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/EPOL/main/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/OS/$basearch/RPM-GPG-KEY-openEuler

[SP1_debuginfo]
name=SP1_debuginfo
baseurl=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/debuginfo/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/debuginfo/$basearch/RPM-GPG-KEY-openEuler

[SP1_source]
name=SP1_source
baseurl=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/source/
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/source/RPM-GPG-KEY-openEuler

[SP1_update]
name=SP1_update
baseurl=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/update/$basearch/
enabled=1
gpgcheck=1
gpgkey=https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/OS/$basearch/RPM-GPG-KEY-openEuler

使用 sudo dnf update 会报错:

...
  - package python-gobject-base-3.22.0-1.el7_4.1.aarch64 requires libffi.so.6()(64bit), but none of the providers can be installed
  - cannot install both libffi-3.4.4-4.oe2403sp2.aarch64 and libffi-3.3-7.oe1.aarch64
  - cannot install both libffi-3.4.4-4.oe2403sp2.aarch64 and libffi-3.0.13-19.el7.aarch64
  - package gobject-introspection-1.76.1-2.oe2403sp2.aarch64 requires libffi.so.8()(64bit), but none of the providers can be installed
  - package gobject-introspection-1.76.1-2.oe2403sp2.aarch64 requires libffi.so.8(LIBFFI_BASE_8.0)(64bit), but none of the providers can be installed
  - package gobject-introspection-1.76.1-2.oe2403sp2.aarch64 requires libffi.so.8(LIBFFI_CLOSURE_8.0)(64bit), but none of the providers can be installed
  - subscription-manager-cockpit-1.23.3-5.oe1.noarch does not belong to a distupgrade repository
  - cannot install the best update candidate for package gobject-introspection-1.58.0-6.oe1.aarch64
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

然后我尝试了 --allowerasing--nobest选项

--allowerasing的报错如下:

日志信息
[lqw@localhost ~]$ sudo dnf update --allowerasing | tee update_log
Last metadata expiration check: 0:03:14 ago on Mon 17 Nov 2025 11:04:36 AM CST.
Error:
 Problem 1: cannot install the best update candidate for package gnutls-3.6.9-5.oe1.aarch64
  - cannot install both gnutls-3.8.2-7.oe2403sp2.aarch64 and gnutls-3.3.29-9.el7_6.aarch64
  - problem with installed package qemu-img-2:4.0.1-11.oe1.aarch64
  - cannot install the best update candidate for package qemu-img-2:4.0.1-11.oe1.aarch64
  - package qemu-img-ma-10:2.12.0-44.el7_8.1.aarch64 requires libgnutls.so.28()(64bit), but none of the providers can be installed
  - package qemu-img-ma-10:2.12.0-44.el7_8.1.aarch64 requires libgnutls.so.28(GNUTLS_1_4)(64bit), but none of the providers can be installed
  - package qemu-img-ma-10:2.12.0-44.el7_8.1.aarch64 requires libgnutls.so.28(GNUTLS_3_1_0)(64bit), but none of the providers can be installed
  - package qemu-img-ma-10:2.12.0-48.el7.aarch64 requires libgnutls.so.28()(64bit), but none of the providers can be installed
  - package qemu-img-ma-10:2.12.0-48.el7.aarch64 requires libgnutls.so.28(GNUTLS_1_4)(64bit), but none of the providers can be installed
  - package qemu-img-ma-10:2.12.0-48.el7.aarch64 requires libgnutls.so.28(GNUTLS_3_1_0)(64bit), but none of the providers can be installed
  - package qemu-img-ma-10:2.12.0-48.el7_9.2.aarch64 requires libgnutls.so.28()(64bit), but none of the providers can be installed
  - package qemu-img-ma-10:2.12.0-48.el7_9.2.aarch64 requires libgnutls.so.28(GNUTLS_1_4)(64bit), but none of the providers can be installed
  - package qemu-img-ma-10:2.12.0-48.el7_9.2.aarch64 requires libgnutls.so.28(GNUTLS_3_1_0)(64bit), but none of the providers can be installed
 Problem 2: package systemd-255-49.oe2403sp2.aarch64 requires openssl-libs, but none of the providers can be installed
  - cannot install the best update candidate for package openssl-libs-1:1.1.1d-9.oe1.aarch64
  - cannot install the best update candidate for package bind-export-libs-32:9.11.4-13.oe1.aarch64
  - problem with installed package bind-export-libs-32:9.11.4-13.oe1.aarch64
  - package bind-export-libs-32:9.11.4-26.P2.el7.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.10.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.10.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.10.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.13.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.13.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.13.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.14.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.14.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.14.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.15.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.15.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.15.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.16.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.16.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.16.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.2.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.2.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.2.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.3.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.3.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.3.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.4.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.4.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.4.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.5.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.5.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.5.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.7.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.7.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.7.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.8.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.8.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.8.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.9.aarch64 requires libcrypto.so.10()(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.9.aarch64 requires libcrypto.so.10(libcrypto.so.10)(64bit), but none of the providers can be installed
  - package bind-export-libs-32:9.11.4-26.P2.el7_9.9.aarch64 requires libcrypto.so.10(OPENSSL_1.0.1_EC)(64bit), but none of the providers can be installed
  - cannot install both openssl-libs-1:3.0.12-23.oe2403sp2.aarch64 and openssl-libs-1:1.0.2k-19.el7.aarch64
  - cannot install both openssl-libs-1:3.0.12-23.oe2403sp2.aarch64 and openssl-libs-1:1.0.2k-21.el7_9.aarch64
  - cannot install both openssl-libs-1:3.0.12-23.oe2403sp2.aarch64 and openssl-libs-1:1.0.2k-22.el7_9.aarch64
  - cannot install both openssl-libs-1:3.0.12-23.oe2403sp2.aarch64 and openssl-libs-1:1.0.2k-24.el7_9.aarch64
  - cannot install both openssl-libs-1:3.0.12-23.oe2403sp2.aarch64 and openssl-libs-1:1.0.2k-25.el7_9.aarch64
  - cannot install both openssl-libs-1:3.0.12-23.oe2403sp2.aarch64 and openssl-libs-1:1.0.2k-26.el7_9.aarch64
  - cannot install the best update candidate for package systemd-243-18.oe1.aarch64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

--nobest的报错信息如下:

日志
Total                                           3.3 MB/s | 891 MB     04:31
warning: /var/cache/dnf/SP1_OS-5284ca4d2f50ab25/packages/adwaita-cursor-theme-45.0-2.oe2403sp2.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID b675600b: NOKEY
SP1_OS                                          7.2 kB/s | 3.0 kB     00:00
Importing GPG key 0xB675600B:
 Userid     : "openeuler <openeuler@compass-ci.com>"
 Fingerprint: 8AA1 6BF9 F2CA 5244 010D CA96 3B47 7C60 B675 600B
 From       : https://repo.huaweicloud.com/openeuler/openEuler-24.03-LTS-SP2/OS/aarch64/RPM-GPG-KEY-openEuler
Is this ok [y/N]: y
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Error: Transaction test error:
  file /usr/sbin/pidof from install of sysvinit-tools-2.88-14.dsf.el7.aarch64 conflicts with file from package procps-ng-3.3.16-11.oe1.aarch64
  file /usr/bin/last from install of sysvinit-tools-2.88-14.dsf.el7.aarch64 conflicts with file from package util-linux-2.34-8.oe1.aarch64
  file /usr/bin/mesg from install of sysvinit-tools-2.88-14.dsf.el7.aarch64 conflicts with file from package util-linux-2.34-8.oe1.aarch64
  file /usr/bin/wall from install of sysvinit-tools-2.88-14.dsf.el7.aarch64 conflicts with file from package util-linux-2.34-8.oe1.aarch64

请问需要解决上面的报错信息吗?可以直接重启吗?如果要解决冲突的话,该怎么解决?