Rocky Linux是一個開源免費的企業(yè)Linux發(fā)行版,提供強(qiáng)大的生產(chǎn)級平臺。通常情況下,您在基于RHEL9的操作系統(tǒng)模板中不推薦使用的network-scripts包,如果您在使用yum update或dnf update命令遇到錯誤,那么可嘗試用以下方法來解決。
Rocky Linux作為穩(wěn)定的企業(yè)級Linux發(fā)型版,許多美國服務(wù)器都支持該操作系統(tǒng)。
例如,RackNerd提供有AlmaLinux 9、RockyLinux 9、CentOS Stream 9等操作系統(tǒng)模板,您可根據(jù)實際需要配置VPS服務(wù)器。如果您在使用這些操作系統(tǒng)模板時,遇到下面錯誤,很可能是因為SolusVM的“Reconfigure Network”工具不承認(rèn)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地址,并且希望在操作系統(tǒng)中自動配置它們,那么重新配置網(wǎng)絡(luò)按鈕非常有用。
dnf upgrade –refresh –allowerasing
systemctl enable NetworkManager
方法2、使用yum或dnf時,使用“- skip-broken”標(biāo)志。
方法3、等待RackNerdVPS控制面板過渡到SolusVM V2,它基于cloud-init,不需要網(wǎng)絡(luò)腳本就能實現(xiàn)自動化網(wǎng)絡(luò)功能。
方法4、定制ISO掛載。目前許多國外主機(jī)商都支持自定義ISO安裝,您可通過控制臺安裝您所需的操作系統(tǒng),無需使用操作系統(tǒng)模板。