新闻资讯
行业资讯
Rocky Linux使用yum或dnf update命令更新失败的解决方法
2023-05-08 15:14:34
摘要:例如,RackNerd提供有AlmaLinux 9、RockyLinux 9、CentOS Stream 9等操作系统模板,您可根据实际需要配置VPS服务器。如果您在使用这些操作系统模板时,遇到下面错误,很可能是因为SolusVM的“Reconfigure Network”工具不承认RHEL9中的“NetworkManager”。

Rocky Linux是一个开源免费的企业Linux发行版,提供强大的生产级平台。通常情况下,您在基于RHEL9的操作系统模板中不推荐使用的network-scripts包,如果您在使用yum update或dnf update命令遇到错误,那么可尝试用以下方法来解决。


Rocky Linux作为稳定的企业级Linux发型版,许多美国服务器都支持该操作系统。

例如,RackNerd提供有AlmaLinux 9、RockyLinux 9、CentOS Stream 9等操作系统模板,您可根据实际需要配置VPS服务器。如果您在使用这些操作系统模板时,遇到下面错误,很可能是因为SolusVM的“Reconfigure Network”工具不承认RHEL9中的“NetworkManager”。

# yum -y update

AlmaLinux 9 – AppStream 8.3 MB/s | 8.0 MB 00:00

AlmaLinux 9 – BaseOS 4.8 MB/s | 2.9 MB 00:00

AlmaLinux 9 – Extras 33 kB/s | 17 kB 00:00

Last metadata expiration check: 0:00:01 ago on Mon 27 Feb 2023 03:32:13 PM CST.

Error:

Problem: cannot install both initscripts-10.11.5-1.el9.x86_64 and initscripts-10.11.4-1.el9.x86_64

– package network-scripts-10.11.4-1.el9.x86_64 requires initscripts(x86-64) = 10.11.4-1.el9, but none of the providers can be installed

– cannot install the best update candidate for package initscripts-10.11.4-1.el9.x86_64

– problem with installed package network-scripts-10.11.4-1.el9.x86_64

(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)

# yum -y update

Rocky Linux 9 – BaseOS 820 kB/s | 1.8 MB 00:02

Rocky Linux 9 – AppStream 4.1 MB/s | 6.6 MB 00:01

Rocky Linux 9 – Extras 11 kB/s | 8.5 kB 00:00

Error:

Problem: cannot install both initscripts-10.11.5-1.el9.x86_64 and initscripts-10.11.4-1.el9.x86_64

– package network-scripts-10.11.4-1.el9.x86_64 requires initscripts(x86-64) = 10.11.4-1.el9, but none of the providers can be installed

– cannot install the best update candidate for package initscripts-10.11.4-1.el9.x86_64

– problem with installed package network-scripts-10.11.4-1.el9.x86_64

(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)

为了解决yum update或dnf update在AlmaLinux 9/Rocky Linux 9/CentOS Stream 9中不起作用这一错误,您可尝试使用以下几种解决方法:

方法1、您可以删除RackNerdVPS中的network-scripts包,并配置NetworkManager(下面的命令),但请记住,这样做时,SolusVM中的“reconfigure network”按钮将不起作用。如果您的VPS上有额外的IP地址,并且希望在操作系统中自动配置它们,那么重新配置网络按钮非常有用。

dnf upgrade –refresh –allowerasing

systemctl enable NetworkManager

方法2、使用yum或dnf时,使用“- skip-broken”标志。

方法3、等待RackNerdVPS控制面板过渡到SolusVM V2,它基于cloud-init,不需要网络脚本就能实现自动化网络功能。

方法4、定制ISO挂载。目前许多国外主机商都支持自定义ISO安装,您可通过控制台安装您所需的操作系统,无需使用操作系统模板。


USA-IDC为您提供免备案服务器 0元试用
立即联系在线客服,即可申请免费产品试用服务
立即申请