我有一个 CentOS 8 系统,我决定升级到 CentOS 9,但这不受官方支持。不过,我确实在谷歌搜索中找到了一些关于执行此操作的说明在 Github 上。这些指导大部分都有效,我已经使用新内核启动到新系统。然而,每次我使用包管理器dnf
执行任何操作时,仍然存在一个问题。
这些是我现在运行时遇到的错误dnf upgrade
...
# dnf upgrade
error: /usr/lib/rpm/macros.d/macros.php74-config: line 3: Macro %undefine is a built-in (%define)
error: /usr/lib/rpm/macros.d/macros.php74-config: line 3: Macro %undefine is a built-in (%define)
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered with an entitlement server. You can use subscription-manager to register.
Last metadata expiration check: 0:27:27 ago on Thu 17 Mar 2022 13:25:04.
Modular dependency problems:
Problem 1: conflicting requests
- nothing provides module(platform:el8) needed by module composer:2:20220317110346:00000000.x86_64
Problem 2: conflicting requests
- nothing provides module(platform:el8) needed by module container-tools:rhel8:8060020211019153644:2e213529.x86_64
Problem 3: conflicting requests
- nothing provides module(platform:el8) needed by module httpd:2.4:8050020211112043353:b4937e53.x86_64
Problem 4: conflicting requests
- nothing provides module(platform:el8) needed by module mariadb:10.3:8030020210419150013:30b713e6.x86_64
Problem 5: conflicting requests
- nothing provides module(platform:el8) needed by module nginx:1.14:8000020211221191913:55190bc5.x86_64
Problem 6: conflicting requests
- nothing provides module(platform:el8) needed by module perl:5.26:8000020190628020724:55190bc5.x86_64
Problem 7: conflicting requests
- nothing provides module(platform:el8) needed by module perl-DBD-MySQL:4.046:8030020200716171139:3a70019f.x86_64
Problem 8: conflicting requests
- nothing provides module(platform:el8) needed by module perl-DBI:1.641:8030020200716150652:1e4bbb35.x86_64
Problem 9: conflicting requests
- nothing provides module(platform:el8) needed by module perl-IO-Socket-SSL:2.066:8040020200924212038:1aedcbfe.x86_64
Problem 10: conflicting requests
- nothing provides module(platform:el8) needed by module perl-libwww-perl:6.34:8040020211102170116:bf75fe78.x86_64
Problem 11: conflicting requests
- nothing provides module(platform:el8) needed by module php:remi-7.4:20220317110346:00000000.x86_64
Problem 12: conflicting requests
- nothing provides module(platform:el8) needed by module python36:3.6:8050020210825152031:982725ab.x86_64
Problem 13: conflicting requests
- nothing provides module(platform:el8) needed by module ruby:2.5:8050020210527144607:b4937e53.x86_64
Problem 14: conflicting requests
- nothing provides module(platform:el8) needed by module subversion:1.10:8030020210222042748:9ce6d490.x86_64
Problem 15: conflicting requests
- nothing provides module(platform:el8) needed by module varnish:6:8050020211109225449:b4937e53.x86_64
Problem 16: conflicting requests
- nothing provides module(platform:el8) needed by module virt:rhel:8060020220208213251:d63f516d.x86_64
Dependencies resolved.
Nothing to do.
Complete!
我尝试删除上面提到的所有软件包并再次安装它们,但它没有改变任何东西。我不太确定该怎么做才能继续。
编辑:我删除了包 rhc 并更新了上面的输出以仅显示我遇到的冲突请求问题。
dnf modules list
以下是来自...的模块列表
composer 2 [e] common Dependency Manager for PHP
container-tools rhel8 [e] common Most recent (rolling) versions of podman, buildah, skopeo, runc, conmon, runc,
conmon, CRIU, Udica, etc as well as dependencies such as container-selinux bu
ilt and tested together, and updated as frequently as every 12 weeks.
httpd 2.4 [e] common, Apache HTTP Server
devel, m
inimal
javapackages-runtime 201801 [e] common Basic runtime utilities to support Java applications
mariadb 10.3 [e] client, MariaDB Module
galera,
server
nginx 1.14 [e] common nginx webserver
perl 5.26 [e] common, Practical Extraction and Report Language
minimal
perl-DBD-MySQL 4.046 [e] common A MySQL interface for Perl
perl-DBI 1.641 [e] common A database access API for Perl
perl-IO-Socket-SSL 2.066 [e] common Perl library for transparent TLS
perl-libwww-perl 6.34 [e] common A Perl interface to the World-Wide Web
php remi-7.4 [e] common, PHP scripting language
devel, m
inimal
python36 3.6 [e] build, c Python programming language, version 3.6
ommon
ruby 2.5 [e] common An interpreter of object-oriented scripting language
subversion 1.10 [e] common, Apache Subversion
server
varnish 6 [e] common Varnish HTTP cache
virt rhel [e] common Virtualization module
如何删除此列表中的每个模块?这应该可以解决这些错误,然后我只需要以 CentOS 9 的方式安装我想要的东西。
答案1
要从版本 7 升级到版本 8,需要使用leapp 项目。 AlmaLinux 团队针对多个发行版对其进行了调整,并将其命名为 ELEvate,但它使用相同的引擎和原理。目前不支持8版本升级到9版本,存在多个问题:
- 当谈到 CentOS Stream 9/RHEL 9/EuroLinux 9 时,RHEL 8 是非常模块化的[在撰写本文时这些都是可用的 EL 9 风格],你不会发现很多模块。以下是 CentOS Stream 8 和 CentOS Stream 9 的比较
CentOS 8 Stream 模块:
[vagrant@localhost ~]$ yum module list
CentOS Stream 8 - AppStream 2.8 MB/s | 20 MB 00:07
CentOS Stream 8 - BaseOS 8.9 MB/s | 19 MB 00:02
CentOS Stream 8 - Extras 20 kB/s | 18 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 9.2 MB/s | 11 MB 00:01
Extra Packages for Enterprise Linux Modular 8 - x86_64 814 kB/s | 1.0 MB 00:01
Extra Packages for Enterprise Linux 8 - Next - x86_64 196 kB/s | 206 kB 00:01
CentOS Stream 8 - AppStream
Name Stream Profiles Summary
389-ds 1.4 389 Directory Server (base)
ant 1.10 [d] common [ Java build tool
d]
container-tools rhel8 [d] common [ Most recent (rolling) versions of podman, buildah, skopeo, runc, conmon, runc, conmon, CRIU, Udica, etc as well as dependencies such as contai
d] ner-selinux built and tested together, and updated as frequently as every 12 weeks.
container-tools 1.0 common [ Stable versions of podman 1.0, buildah 1.5, skopeo 0.1, runc, conmon, CRIU, Udica, etc as well as dependencies such as container-selinux built
d] and tested together, and supported for 24 months.
container-tools 2.0 common [ Stable versions of podman 1.6, buildah 1.11, skopeo 0.1, runc, conmon, etc as well as dependencies such as container-selinux built and tested
d] together, and supported as documented on the Application Stream lifecycle page.
container-tools 3.0 common [ Stable versions of podman 3.0, buildah 1.19, skopeo 1.2, runc, conmon, etc as well as dependencies such as container-selinux built and tested
d] together, and supported as documented on the Application Stream lifecycle page.
container-tools 4.0 common Most recent (rolling) versions of podman, buildah, skopeo, runc, conmon, runc, conmon, CRIU, Udica, etc as well as dependencies such as contai
ner-selinux built and tested together, and updated as frequently as every 12 weeks.
freeradius 3.0 [d] server [ High-performance and highly configurable free RADIUS server
d]
gimp 2.8 [d] common [ gimp module
d], deve
l
go-toolset rhel8 [d] common [ Go
d]
httpd 2.4 [d] common [ Apache HTTP Server
d], deve
l, minim
al
idm DL1 adtrust, The Red Hat Enterprise Linux Identity Management system module
client,
common
[d], dns
, server
idm client [d] common [ RHEL IdM long term support client module
d]
inkscape 0.92.3 [d] common [ Vector-based drawing program using SVG
d]
javapackages-runtime 201801 [d] common [ Basic runtime utilities to support Java applications
d]
jmc rhel8 [d] common [ Java Mission Control is a profiling and diagnostics tool for the Hotspot JVM
d], core
libselinux-python 2.8 common Python 2 bindings for libselinux
llvm-toolset rhel8 [d] common [ LLVM
d]
log4j 2 common Java logging library
mailman 2.1 [d] common [ Electronic mail discussion and e-newsletter lists managing software
d]
mariadb 10.3 [d] client, MariaDB Module
galera,
server [
d]
mariadb 10.5 client, MariaDB Module
galera,
server [
d]
maven 3.5 [d] common [ Java project management and project comprehension tool
d]
maven 3.6 common [ Java project management and project comprehension tool
d]
mercurial 4.8 [d] common [ Mercurial -- a distributed SCM
d]
mod_auth_openidc 2.3 Apache module suporting OpenID Connect authentication
mysql 8.0 [d] client, MySQL Module
server [
d]
nginx 1.14 [d] common [ nginx webserver
d]
nginx 1.16 common [ nginx webserver
d]
nginx 1.18 common [ nginx webserver
d]
nginx 1.20 common [ nginx webserver
d]
nodejs 10 [d] common [ Javascript runtime
d], deve
lopment,
minimal
, s2i
nodejs 12 common [ Javascript runtime
d], deve
lopment,
minimal
, s2i
nodejs 14 common [ Javascript runtime
d], deve
lopment,
minimal
, s2i
nodejs 16 common [ Javascript runtime
d], deve
lopment,
minimal
, s2i
parfait 0.5 common Parfait Module
perl 5.24 common [ Practical Extraction and Report Language
d], mini
mal
perl 5.26 [d][e] common [ Practical Extraction and Report Language
d], mini
mal
perl 5.30 common [ Practical Extraction and Report Language
d], mini
mal
perl 5.32 common [ Practical Extraction and Report Language
d], mini
mal
perl-App-cpanminus 1.7044 [d] common [ Get, unpack, build and install CPAN modules
d]
perl-DBD-MySQL 4.046 [d] common [ A MySQL interface for Perl
d]
perl-DBD-Pg 3.7 [d] common [ A PostgreSQL interface for Perl
d]
perl-DBD-SQLite 1.58 [d] common [ SQLite DBI driver
d]
perl-DBI 1.641 [d] common [ A database access API for Perl
d]
perl-FCGI 0.78 [d] common [ FastCGI Perl bindings
d]
perl-IO-Socket-SSL 2.066 [d][e] common [ Perl library for transparent TLS
d]
perl-YAML 1.24 [d] common [ Perl parser for YAML
d]
perl-libwww-perl 6.34 [d][e] common [ A Perl interface to the World-Wide Web
d]
php 7.2 [d] common [ PHP scripting language
d], deve
l, minim
al
php 7.3 common [ PHP scripting language
d], deve
l, minim
al
php 7.4 common [ PHP scripting language
d], deve
l, minim
al
php 8.0 common [ PHP scripting language
d], deve
l, minim
al
pki-core 10.6 PKI Core module for PKI 10.6 or later
pki-deps 10.6 PKI Dependencies module for PKI 10.6 or later
pmdk 1-fileformat-v6 Persistent Memory Development Kit (former NVML)
pmdk 1_fileformat_v6 Persistent Memory Development Kit (former NVML)
postgresql 9.6 client, PostgreSQL server and client module
server [
d]
postgresql 10 [d] client, PostgreSQL server and client module
server [
d]
postgresql 12 client, PostgreSQL server and client module
server [
d]
postgresql 13 client, PostgreSQL server and client module
server [
d]
python27 2.7 [d] common [ Python programming language, version 2.7
d]
python36 3.6 [d][e] build, c Python programming language, version 3.6
ommon [d
]
python38 3.8 [d] build, c Python programming language, version 3.8
ommon [d
]
python39 3.9 [d] build, c Python programming language, version 3.9
ommon [d
]
redis 5 [d] common [ Redis persistent key-value database
d]
redis 6 common [ Redis persistent key-value database
d]
rhn-tools 1.0 [d] common [ Red Hat Satellite 5 tools for RHEL
d]
ruby 2.5 [d] common [ An interpreter of object-oriented scripting language
d]
ruby 2.6 common [ An interpreter of object-oriented scripting language
d]
ruby 2.7 common [ An interpreter of object-oriented scripting language
d]
ruby 3.0 common [ An interpreter of object-oriented scripting language
d]
rust-toolset rhel8 [d] common [ Rust
d]
satellite-5-client 1.0 [d] common [ Red Hat Satellite 5 client packages
d], gui
scala 2.10 [d] common [ A hybrid functional/object-oriented language for the JVM
d]
squid 4 [d] common [ Squid - Optimising Web Delivery
d]
subversion 1.10 [d] common [ Apache Subversion
d], serv
er
subversion 1.14 common [ Apache Subversion
d], serv
er
swig 3.0 [d] common [ Connects C/C++/Objective C to some high-level programming languages
d], comp
lete
swig 4.0 common [ Connects C/C++/Objective C to some high-level programming languages
d], comp
lete
varnish 6 [d] common [ Varnish HTTP cache
d]
virt rhel [d][e] common [ Virtualization module
(...)
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
CentOS Stream 9 模块:
[vagrant@localhost ~]$ sudo yum module list
CentOS Stream 9 - BaseOS 2.7 MB/s | 5.6 MB 00:02
CentOS Stream 9 - AppStream 4.3 MB/s | 12 MB 00:02
Last metadata expiration check: 0:00:01 ago on Thu 17 Mar 2022 03:34:29 PM UTC.
(...) THERE IS NOTHING
CentOS Stream 9 中有模块,但目前 [17.03.2022],您在 AppStream 存储库中找不到任何内容-http://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/repodata/- 没有模块化数据文件。
- 另一个大问题是,当 RHEL 9 使用 SQLite 时,RHEL 8 使用 Berkeley DB 作为 RPM 的后端https://fedoraproject.org/wiki/Changes/Sqlite_Rpmdb
总而言之 -> 不要急于从 CentOS Stream 8 和 CentOS Stream 9 进行迁移。如果 Red Hat 创建了一些迁移脚本(可能基于 LEApp -https://leapp.readthedocs.io/en/latest/)那么它是可能的、可重复的和可维护的。
答案2
就我而言,我可以这样做 :sudo yum module reset <erroring module(s)>
Last metadata expiration check: 0:19:11 ago on Wed 24 Apr 2024 04:09:54 PM CEST.
Modular dependency problems:
Problem 1: conflicting requests
- nothing provides module(platform:el8) needed by module javapackages-tools:201801:8050020210907194719:79ce6533.x86_64 from @modulefailsafe
Problem 2: conflicting requests
- nothing provides module(platform:el8) needed by module mariadb:10.3:8030020210419150013:30b713e6.x86_64 from @modulefailsafe
Problem 3: conflicting requests
- nothing provides module(platform:el8) needed by module mysql:8.0:8040020210901180257:9f9e2e7e.x86_64 from @modulefailsafe
Problem 4: conflicting requests
- nothing provides module(platform:el8) needed by module nginx:1.14:8000020211221191913:55190bc5.x86_64 from @modulefailsafe
Problem 5: conflicting requests
- nothing provides module(platform:el8) needed by module perl:5.26:8000020190628020724:55190bc5.x86_64 from @modulefailsafe
Problem 6: conflicting requests
- nothing provides module(platform:el8) needed by module perl-IO-Socket-SSL:2.066:8040020200924212038:1aedcbfe.x86_64 from @modulefailsafe
Problem 7: conflicting requests
- nothing provides module(platform:el8) needed by module perl-libwww-perl:6.34:8040020211102170116:bf75fe78.x86_64 from @modulefailsafe
Problem 8: conflicting requests
- nothing provides module(platform:el8) needed by module python27:2.7:8080020230117193612:ba5e661a.x86_64 from @modulefailsafe
Problem 9: conflicting requests
- nothing provides module(platform:el8) needed by module python36:3.6:8050020210825152031:982725ab.x86_64 from @modulefailsafe
Problem 10: conflicting requests
- nothing provides module(platform:el8) needed by module subversion:1.10:8070020220711155714:78111232.x86_64 from @modulefailsafe
使用命令修复:
sudo yum module reset javapackages-tools mariadb mysql nginx perl perl-IO-Socket-SSL perl-libwww-perl python27 python36 subversion