Rocky Linux 8 升级至 Rocky Linux 9
Rocky Linux 中文社区投稿人:抽离1024

关于 Rocky Linux 9 新特性,请参考: Rocky Linux 9.0 现已发布啦 – Rocky Linux

温馨提醒
升级之前请做好数据备份及配置。

升级系统

# 安装 epel 源
dnf -y install epel-release

# 更新系统至最新版
dnf -y update

# 重启系统
reboot

# 安装 rpmconf 和 yum-utils
dnf -y install rpmconf yum-utils

# 执行 rpmconf,如果出现提示信息,请输入 Y 和回车继续,如果没提示继续。
rpmconf -a

# 安装 rocky-release 包
rpm -e --nodeps `rpm -qa|grep rocky-release`
rpm -e --nodeps `rpm -qa|grep rocky-gpg-keys`
rpm -e --nodeps `rpm -qa|grep rocky-repos`
rpm -ivh --nodeps --force https://mirrors.aliyun.com/rockylinux/9/BaseOS/x86_64/os/Packages/r/rocky-gpg-keys-9.1-1.11.el9.noarch.rpm
rpm -ivh --nodeps --force https://mirrors.aliyun.com/rockylinux/9/BaseOS/x86_64/os/Packages/r/rocky-release-9.1-1.11.el9.noarch.rpm
rpm -ivh --nodeps --force https://mirrors.aliyun.com/rockylinux/9/BaseOS/x86_64/os/Packages/r/rocky-repos-9.1-1.11.el9.noarch.rpm
dnf clean all

# 升级 Rocky Linux 9
dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync

# 如出现以下报错,请卸载 conflicts with file from package 后面的包名,如果没报错接着执行下一步
错误: 事物测试失败:
    file /usr/share/redhat-logos from install of rocky-logos-86.2-1.el8.x86_64 conflicts with file from package rocky-logos-86.2-1.el8.x86_64

rpm -e --nodeps rocky-logos-86.2-1.el8.x86_64

# 卸载完后重新执行下面的命令
dnf clean all
dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync

# 重建 rpm 数据库,出现警告忽略。
rpm --rebuilddb

# 安装新内核
dnf -y install kernel
dnf -y install kernel-core
dnf -y install shim

# 安装基础环境
dnf group install minimal-environment -y

# 安装 rpmconf 和 yum-utils
dnf -y install rpmconf yum-utils

# 执行 rpmconf,根据提示一直输入 Y 和回车即可
rpmconf -a

# 设置采用最新内核引导
export grubcfg=`find /boot/ -name rocky`
grub2-mkconfig -o $grubcfg/grub.cfg

# 更新系统
dnf -y update

# 重启系统
reboot

卸载旧内核

具体内核卸载参考: Rocky Linux 9 内核升级至 6.0 – Rocky Linux

相关错误处理

# 禁用无效 module 处理
# 问题 1: 冲突的请求
# \- 没有提供模块 module(platform:el8) 所需要的 mariadb:10.3:8060020220913075833:d63f516d.x86\_64
dnf module disable mariadb:10.3:8060020220913075833 python27:2.7:8070020221108111144 python36:3.6:8050020211109130820 -y

后述

如果您在迁移过程中遇到任何困难,欢迎随时留言。我们会协助您分析问题,并根据解决方案更新相关文章内容,帮助避免后续其它用户踩坑。

Avatar photo

关于 chouli1024

软件工程师,擅长java、C#、scala、python、前端、php、c、c++,linux运维,数据库优化、安卓系统源码编译、linux操作系统的源码等等
用一杯咖啡支持我们,每一篇 [文档] 都经过我们实操,并非从网上一味的copy,期间花费了大量的心思,希望能够帮忙到您。

评论

  1. 4天前
    2024-2-27 15:06:01

    [root@localhost etc]# dnf module disable -y perl:5.26:8050020211109115414:b4937e53.x86_64 perl-IO-Socket-SSL:2.066:8090020231016070024:88fd4976.x86_64 perl-libwww-perl:6.34:8090020231016070052:8af8375c.x86_64 python36:3.6:8090020231214163110:ed68999d.x86_64
    Last metadata expiration check: 0:27:19 ago on Tue 27 Feb 2024 02:37:26 PM CST.
    Modular dependency problems:
    Problem 1: conflicting requests

    • nothing provides module(platform:el8) needed by module perl:5.26:8050020211109115414:b4937e53.x86_64 from @modulefailsafe
      Problem 2: conflicting requests
    • nothing provides module(platform:el8) needed by module perl-IO-Socket-SSL:2.066:8090020231016070024:88fd4976.x86_64 from @modulefailsafe
      Problem 3: conflicting requests
    • nothing provides module(platform:el8) needed by module perl-libwww-perl:6.34:8090020231016070052:8af8375c.x86_64 from @modulefailsafe
      Problem 4: conflicting requests
    • nothing provides module(platform:el8) needed by module python36:3.6:8090020231214163110:ed68999d.x86_64 from @modulefailsafe
      Unable to resolve argument perl:5.26:8050020211109115414:b4937e53.x86_64
      Unable to resolve argument perl-IO-Socket-SSL:2.066:8090020231016070024:88fd4976.x86_64
      Unable to resolve argument perl-libwww-perl:6.34:8090020231016070052:8af8375c.x86_64
      Unable to resolve argument python36:3.6:8090020231214163110:ed68999d.x86_64
      Error: Problems in request:
      missing groups or modules: perl:5.26:8050020211109115414:b4937e53.x86_64, perl-IO-Socket-SSL:2.066:8090020231016070024:88fd4976.x86_64, perl-libwww-perl:6.34:8090020231016070052:8af8375c.x86_64, python36:3.6:8090020231214163110:ed68999d.x86_64
      Modular dependency problems:

    Problem 1: conflicting requests

    • nothing provides module(platform:el8) needed by module perl:5.26:8050020211109115414:b4937e53.x86_64 from @modulefailsafe
      Problem 2: conflicting requests
    • nothing provides module(platform:el8) needed by module perl-IO-Socket-SSL:2.066:8090020231016070024:88fd4976.x86_64 from @modulefailsafe
      Problem 3: conflicting requests
    • nothing provides module(platform:el8) needed by module perl-libwww-perl:6.34:8090020231016070052:8af8375c.x86_64 from @modulefailsafe
      Problem 4: conflicting requests
    • nothing provides module(platform:el8) needed by module python36:3.6:8090020231214163110:ed68999d.x86_64 from @modulefailsafe

    相关错误处理这块,解决不了。dnf update无法执行

    • 3天前
      2024-2-28 9:47:33

      Unable to resolve argument perl:5.26:8050020211109115414:b4937e53.x86_64 Unable to resolve argument perl-IO-Socket-SSL:2.066:8090020231016070024:88fd4976.x86_64 Unable to resolve argument perl-libwww-perl:6.34:8090020231016070052:8af8375c.x86_64 Unable to resolve argument python36:3.6:8090020231214163110:ed68999d.x86_64
      这里的报错信息是关键。遗漏了,不能加后缀,比如perl:5.26:8050020211109115414:b4937e53.x86_64 ,只需要dnf module disable perl:5.26:8050020211109115414 -y 即可。

发送评论 编辑评论


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇