首页 > 运维 > linux运维 > 正文

Centos 8完美升级到Centos Stream 8教程

星夢妙者
发布: 2025-07-19 11:06:21
原创
478人浏览过

在安装宝塔面板时,我发现centos 8已经停止维护,导致官方软件源失效,无法获取许多依赖包。解决这个问题有两种方法:一是切换到腾讯或阿里云的软件源,升级系统;二是尝试更换源。最终,我选择了更换源,尽管过程有些复杂,但最终得以暂时解决。然而,问题接连出现,安装后宝塔面板的nginx无法启动,并显示以下错误:

error while loading shared libraries: libgd.so.2: cannot open shared object....
登录后复制

经过查找资料,我了解到这是由于缺少gd库导致的。最简单的解决方法是通过yum install gd来安装gd库。然而,在尝试使用该命令时,发现gd库无法找到,问题依然存在。最终,我决定升级到CentOS Stream,以避免将来再次遇到类似的问题。以下是升级过程的记录,整体而言,升级过程相当简单且轻松。

首先,输入以下命令,检查你的dnf仓库中是否有centos-release-stream

dnf search centos-release-stream
登录后复制

运行结果如下图所示:

Centos 8完美升级到Centos Stream 8教程

继续输入以下命令,开始安装centos-release-stream

dnf install -y centos-release-stream
登录后复制

接着,输入以下命令,查看已安装完毕的仓库:

小爱开放平台
小爱开放平台

小米旗下小爱开放平台

小爱开放平台 281
查看详情 小爱开放平台
dnf repolist
登录后复制

结果如下:

[root@VM-0-5-centos ~]# dnf repolistRepository AppStream is listed more than once in the configurationInvalid configuration value: failovermethod=priority in /etc/yum.repos.d/CentOS-Epel.repo; Configuration: OptionBinding with id "failovermethod" does not existRepository AppStream is listed more than once in the configurationRepository BaseOS is listed more than once in the configurationRepository centosplus is listed more than once in the configurationRepository extras is listed more than once in the configurationRepository fasttrack is listed more than once in the configurationRepository AppStream is listed more than once in the configurationRepository PowerTools is listed more than once in the configurationRepository extras is listed more than once in the configurationRepository fasttrack is listed more than once in the configurationRepository PowerTools is listed more than once in the configurationRepository epel is listed more than once in the configurationrepo id                   repo nameBaseOS                    Qcloud centos OS - x86_64PowerTools                Qcloud centos PowerTools - x86_64Stream-AppStream          CentOS-Stream - AppStreamStream-BaseOS             CentOS-Stream - BaseStream-extras             CentOS-Stream - Extrasepel                      EPEL for redhat/centos 8 - x86_64epel-modular              Extra Packages for Enterprise Linux Modular 8 - x86_64extras                    Qcloud centos extras - x86_64
登录后复制

接着,输入以下命令,设置默认仓库:

dnf swap centos-linux-repos centos-stream-repos
登录后复制

最后,同步下仓库(系统安装为8.2版本后,dnf仓库会自动更新,所以最后这个同步命令不运行也可以):

dnf distro-sync
登录后复制

这样就完成了系统升级,查看下系统信息:

[root@VM-0-5-centos ~]# cat /etc/redhat-releaseCentOS Stream release 8
登录后复制

参考资料:Centos 8完美升级到Centos Stream 8教程 - 冰沫记

以上就是Centos 8完美升级到Centos Stream 8教程的详细内容,更多请关注php中文网其它相关文章!

最佳 Windows 性能的顶级免费优化软件
最佳 Windows 性能的顶级免费优化软件

每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号